@Override
    public int deserializeDataElementDataFromByteArray(byte[] byteArray, int startIndex)
            throws TikaException, IOException {
        AtomicInteger index = new AtomicInteger(startIndex);
        this.revisionManifest = StreamObject.getCurrent(byteArray, index, RevisionManifest.class);

        this.revisionManifestRootDeclareList = new ArrayList<>();
        this.revisionManifestObjectGroupReferences = new ArrayList<>();
        AtomicReference<StreamObjectHeaderStart> header = new AtomicReference<>();
        int headerLength = 0;
        while ((headerLength = StreamObjectHeaderStart.tryParse(byteArray, index.get(), header)) !=
                0) {
            if (header.get().type == StreamObjectTypeHeaderStart.RevisionManifestRootDeclare) {
                index.addAndGet(headerLength);
                this.revisionManifestRootDeclareList.add(
                        (RevisionManifestRootDeclare) StreamObject.parseStreamObject(header.get(),
                                byteArray, index));
            } else if (header.get().type ==
                    StreamObjectTypeHeaderStart.RevisionManifestObjectGroupReferences) {
                index.addAndGet(headerLength);
                this.revisionManifestObjectGroupReferences.add(
                        (RevisionManifestObjectGroupReferences) StreamObject.parseStreamObject(
                                header.get(), byteArray, index));
            } else {
                throw new DataElementParseErrorException(index.get(),
                        "Failed to parse RevisionManifestDataElement, expect the inner object type " +
                                "RevisionManifestRootDeclare or RevisionManifestObjectGroupReferences, " +
                                "but actual type value is " + header.get().type, null);
            }
        }

        return index.get() - startIndex;
    }
Used to return the length of this element.

@param byteArray  A Byte list
@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/RevisionManifestDataElementData.java