@Override
    protected int doDeserializeFromByteArray(byte[] byteArray, int startIndex)
            throws IOException, TikaException {
        BitReader reader = new BitReader(byteArray, startIndex);
        int headerType = reader.readInt32(2);

        if (headerType != 0x1) {
            throw new TikaException(String.format(Locale.US,
                    "Failed to get the StreamObjectHeaderEnd8bit header type value, " +
                            "expect value %s, but actual value is %s", 0x1, headerType));
        }

        int typeValue = reader.readUInt32(6);
        this.type = StreamObjectTypeHeaderEnd.fromIntVal(typeValue);
        if (this.type == null) {
            throw new TikaException(String.format(Locale.US,
                    "Failed to get the StreamObjectHeaderEnd8bit type value, the value %s is not defined",
                    typeValue));
        }

        return 1;
    }
This method is used to deserialize the StreamObjectHeaderEnd8bit basic object from the
specified byte array and start index.

@param byteArray  Specify the byte array.
@param startIndex Specify the start index from the byte array.
@return Return the length in byte of the StreamObjectHeaderEnd8bit basic object.
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/main/java/org/apache/tika/parser/microsoft/onenote/fsshttpb/streamobj/StreamObjectHeaderEnd8bit.java