Class StreamObjectHeaderStart16bit

All Implemented Interfaces:
IFSSHTTPBSerializable

public class StreamObjectHeaderStart16bit extends StreamObjectHeaderStart
An 16-bit header for a compound object would indicate the start of a stream object
  • Constructor Details

    • StreamObjectHeaderStart16bit

      public StreamObjectHeaderStart16bit(StreamObjectTypeHeaderStart type, int length) throws TikaException
      Initializes a new instance of the StreamObjectHeaderStart16bit class with specified type and length.
      Parameters:
      type - Specify the type of the StreamObjectHeaderStart16bit.
      length - Specify the length of the StreamObjectHeaderStart16bit.
      Throws:
      TikaException
    • StreamObjectHeaderStart16bit

      public StreamObjectHeaderStart16bit(StreamObjectTypeHeaderStart type) throws TikaException
      Initializes a new instance of the StreamObjectHeaderStart16bit class with specified type.
      Parameters:
      type - Specify the type of the StreamObjectHeaderStart16bit.
      Throws:
      TikaException
    • StreamObjectHeaderStart16bit

      public StreamObjectHeaderStart16bit()
      Initializes a new instance of the StreamObjectHeaderStart16bit class, this is the default constructor.
  • Method Details

    • serializeToByteList

      public List<Byte> serializeToByteList() throws IOException
      This method is used to convert the element of StreamObjectHeaderStart16bit basic object into a byte List.
      Specified by:
      serializeToByteList in interface IFSSHTTPBSerializable
      Specified by:
      serializeToByteList in class BasicObject
      Returns:
      Return the byte list which store the byte information of StreamObjectHeaderStart16bit.
      Throws:
      IOException
    • ToUint16

      public short ToUint16() throws IOException
      This method is used to get the Uint16 value of the 16bit stream object header.
      Returns:
      Return the ushort value.
      Throws:
      IOException
    • doDeserializeFromByteArray

      protected int doDeserializeFromByteArray(byte[] byteArray, int startIndex) throws IOException, TikaException
      This method is used to deserialize the StreamObjectHeaderStart16bit basic object from the specified byte array and start index.
      Specified by:
      doDeserializeFromByteArray in class BasicObject
      Parameters:
      byteArray - Specify the byte array.
      startIndex - Specify the start index from the byte array.
      Returns:
      Return the length in byte of the StreamObjectHeaderStart16bit basic object.
      Throws:
      IOException
      TikaException