@Override
    protected void deserializeItemsFromByteArray(byte[] byteArray, AtomicInteger currentIndex,
                                                 int lengthOfItems)
            throws TikaException, IOException {
        if (lengthOfItems != 0) {
            throw new StreamObjectParseErrorException(currentIndex.get(),
                    "ObjectGroupMetadataDeclarations", "Stream object over-parse error", null);
        }

        AtomicInteger index = new AtomicInteger(currentIndex.get());
        int headerLength;
        AtomicReference<StreamObjectHeaderStart> header = new AtomicReference<>();
        this.objectGroupMetadataList = new ArrayList<>();

        while ((headerLength = StreamObjectHeaderStart.tryParse(byteArray, index.get(), header)) !=
                0) {
            index.addAndGet(headerLength);
            if (header.get().type == StreamObjectTypeHeaderStart.ObjectGroupMetadata) {
                this.objectGroupMetadataList.add(
                        (ObjectGroupMetadata) StreamObject.parseStreamObject(header.get(),
                                byteArray, index));
            } else {
                throw new StreamObjectParseErrorException(index.get(), "ObjectGroupDeclarations",
                        "Failed to parse ObjectGroupMetadataDeclarations, expect the inner object type " +
                                "ObjectGroupMetadata, but actual type value is " +
                                header.get().type, null);
            }
        }

        currentIndex.set(index.get());
    }
Used to de-serialize the element.

@param byteArray     A Byte array
@param currentIndex  Start position
@param lengthOfItems The length of the items
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/main/java/org/apache/tika/parser/microsoft/onenote/fsshttpb/streamobj/ObjectGroupMetadataDeclarations.java