public static int tryParse(byte[] byteArray, int startIndex,
                               AtomicReference<StreamObjectHeaderStart> streamObjectHeader) {
        int headerType = byteArray[startIndex] & 0x03;
        if (headerType == StreamObjectHeaderStart.STREAM_OBJECT_HEADER_START_16_BIT) {
            streamObjectHeader.set(new StreamObjectHeaderStart16bit());
        } else {
            if (headerType == StreamObjectHeaderStart.STREAM_OBJECT_HEADER_START_32_BIT) {
                streamObjectHeader.set(new StreamObjectHeaderStart32bit());
            } else {
                return 0;
            }
        }

        try {
            return streamObjectHeader.get().deserializeFromByteArray(byteArray, startIndex);
        } catch (Exception e) {
            return 0;
        }
    }
This method is used to parse the actual 16bit or 32bit stream header.

@param byteArray          Specify the Byte array.
@param startIndex         Specify the start position.
@param streamObjectHeader Specify the out value for the parse result.
@return Return true if success, otherwise returns false.
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/main/java/org/apache/tika/parser/microsoft/onenote/fsshttpb/streamobj/StreamObjectHeaderStart.java