@Override
    public int deserializeDataElementDataFromByteArray(byte[] byteArray, int startIndex)
            throws TikaException, IOException {
        AtomicInteger index = new AtomicInteger(startIndex);
        int headerLength = 0;
        AtomicReference<StreamObjectHeaderStart> header = new AtomicReference<>();
        boolean isStorageIndexManifestMappingExist = false;
        while ((headerLength = StreamObjectHeaderStart.tryParse(byteArray, index.get(), header)) !=
                0) {
            index.addAndGet(headerLength);
            if (header.get().type == StreamObjectTypeHeaderStart.StorageIndexManifestMapping) {
                if (isStorageIndexManifestMappingExist) {
                    throw new DataElementParseErrorException(index.get() - headerLength,
                            "Failed to parse StorageIndexDataElement, only can contain zero or one " +
                                    "StorageIndexManifestMapping", null);
                }

                this.storageIndexManifestMapping =
                        (StorageIndexManifestMapping) StreamObject.parseStreamObject(header.get(),
                                byteArray, index);
                isStorageIndexManifestMappingExist = true;
            } else if (header.get().type == StreamObjectTypeHeaderStart.StorageIndexCellMapping) {
                this.storageIndexCellMappingList.add(
                        (StorageIndexCellMapping) StreamObject.parseStreamObject(header.get(),
                                byteArray, index));
            } else if (header.get().type ==
                    StreamObjectTypeHeaderStart.StorageIndexRevisionMapping) {
                this.storageIndexRevisionMappingList.add(
                        (StorageIndexRevisionMapping) StreamObject.parseStreamObject(header.get(),
                                byteArray, index));
            } else {
                throw new DataElementParseErrorException(index.get() - headerLength,
                        "Failed to parse StorageIndexDataElement, expect the inner object type " +
                                "StorageIndexCellMapping or StorageIndexRevisionMapping, but actual type value is " +
                                header.get().type, null);
            }
        }

        return index.get() - startIndex;
    }
Used to de-serialize the data element.

@param byteArray  Byte array
@param startIndex Start position
@return The length of the element
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/main/java/org/apache/tika/parser/microsoft/onenote/fsshttpb/streamobj/StorageIndexDataElementData.java