Interface JBBPVarFieldProcessor


public interface JBBPVarFieldProcessor
The Interface describes a class which can process VAR fields from a stream.
Since:
1.0
  • Method Details

    • readVarArray

      JBBPAbstractArrayField<? extends JBBPAbstractField> readVarArray(JBBPBitInputStream inStream, int arraySize, JBBPNamedFieldInfo fieldName, int extraValue, JBBPByteOrder byteOrder, JBBPNamedNumericFieldMap numericFieldMap, JBBPArraySizeLimiter arraySizeLimiter) throws IOException
      Read a field array from a stream. The Method must read a field array from a stream and return the value with the provided field name info.
      Parameters:
      inStream - the data source bit stream, it must not be null
      arraySize - the array size, if it is negative one then whole stream must be read
      fieldName - the field name info for the VAR field, it can be null for anonymous fields
      extraValue - the extra value for the field, by default it is 0, it is the integer value after ':' char in the field type
      byteOrder - the byte order for the field, it must not be null
      numericFieldMap - the numeric field map for the session, it must not be null, it can be used for access to already read values of another numeric fields.
      arraySizeLimiter - limiter to check number of elements during whole stream array read, must not be null
      Returns:
      a field array without nulls as values, it must not return null
      Throws:
      IOException - it can be thrown for transport errors or another process exceptions
      JBBPReachedArraySizeLimitException - thrown if reached limit for whole stream array
      Since:
      2.1.0
      See Also:
    • readVarField

      JBBPAbstractField readVarField(JBBPBitInputStream inStream, JBBPNamedFieldInfo fieldName, int extraValue, JBBPByteOrder byteOrder, JBBPNamedNumericFieldMap numericFieldMap) throws IOException
      Read a field from a stream. The Method must read a field from a stream and return it with the provided name field info.
      Parameters:
      inStream - the data source bit stream, it must not be null
      fieldName - the field name info for the VAR field, it can be null for anonymous fields
      extraValue - the extra value for the field, by default it is 0, it is the integer value after ':' char in the field type
      byteOrder - the byte order for the field, it must not be null
      numericFieldMap - the numeric field map for the session, it must not be null, it can be used for access to already read values of another numeric fields.
      Returns:
      a read field object, it must not return null
      Throws:
      IOException - it should be thrown for transport errors