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

        AtomicInteger index = new AtomicInteger(currentIndex.get());
        int headerLength = 0;
        AtomicReference<StreamObjectHeaderStart> header = new AtomicReference<>();
        this.objectDeclarationList = new ArrayList<>();
        this.objectGroupObjectBLOBDataDeclarationList = new ArrayList<>();
        while ((headerLength = StreamObjectHeaderStart.tryParse(byteArray, index.get(), header)) !=
                0) {
            if (header.get().type == StreamObjectTypeHeaderStart.ObjectGroupObjectDeclare) {
                index.addAndGet(headerLength);
                this.objectDeclarationList.add(
                        (ObjectGroupObjectDeclare) StreamObject.parseStreamObject(header.get(),
                                byteArray, index));
            } else if (header.get().type ==
                    StreamObjectTypeHeaderStart.ObjectGroupObjectBLOBDataDeclaration) {
                index.addAndGet(headerLength);
                this.objectGroupObjectBLOBDataDeclarationList.add(
                        (ObjectGroupObjectBLOBDataDeclaration) StreamObject.parseStreamObject(
                                header.get(), byteArray, index));
            } else {
                throw new StreamObjectParseErrorException(index.get(), "ObjectGroupDeclarations",
                        "Failed to parse ObjectGroupDeclarations, expect the inner object type either " +
                                "ObjectGroupObjectDeclare or ObjectGroupObjectBLOBDataDeclaration, " +
                                "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/ObjectGroupDeclarations.java