Class StreamObjectHeaderStart

All Implemented Interfaces:
Direct Known Subclasses:
StreamObjectHeaderStart16bit, StreamObjectHeaderStart32bit

public abstract class StreamObjectHeaderStart extends BasicObject
This class specifies the base class for 16-bit or 32-bit stream object header start
  • Field Details


      public static final int STREAM_OBJECT_HEADER_START_16_BIT
      Specify for 16-bit stream object header start.
      See Also:

      public static final int STREAM_OBJECT_HEADER_START_32_BIT
      Specify for 32-bit stream object header start.
      See Also:
    • type

    • headerType

      protected int headerType
      Gets or sets the type of the stream object. value 0 for 16-bit stream object header start, value 2 for 32-bit stream object header start.
    • compound

      protected int compound
      Gets or sets a value that specifies if set a compound parse type is needed and MUST be ended with either an 8-bit stream object header end or a 16-bit stream object header end. If the bit is zero, it specifies a single object. Otherwise it specifies a compound object.
    • length

      protected int length
  • Constructor Details

    • StreamObjectHeaderStart

      protected StreamObjectHeaderStart()
      Initializes a new instance of the StreamObjectHeaderStart class.
    • StreamObjectHeaderStart

      protected StreamObjectHeaderStart(StreamObjectTypeHeaderStart streamObjectTypeHeaderStart)
      Initializes a new instance of the StreamObjectHeaderStart class with specified header type.
      streamObjectTypeHeaderStart - Specify the value of the StreamObjectHeaderStart Type.
  • Method Details

    • tryParse

      public static int tryParse(byte[] byteArray, int startIndex, AtomicReference<StreamObjectHeaderStart> streamObjectHeader)
      This method is used to parse the actual 16bit or 32bit stream header.
      byteArray - Specify the Byte array.
      startIndex - Specify the start position.
      streamObjectHeader - Specify the out value for the parse result.
      Return true if success, otherwise returns false.