Package com.igormaznitsa.jbbp
Interface JBBPVarFieldProcessor
public interface JBBPVarFieldProcessor
The Interface describes a class which can process VAR fields from a stream.
- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionJBBPAbstractArrayField<? extends JBBPAbstractField> readVarArray(JBBPBitInputStream inStream, int arraySize, JBBPNamedFieldInfo fieldName, int extraValue, JBBPByteOrder byteOrder, JBBPNamedNumericFieldMap numericFieldMap, JBBPArraySizeLimiter arraySizeLimiter) Read a field array from a stream.readVarField(JBBPBitInputStream inStream, JBBPNamedFieldInfo fieldName, int extraValue, JBBPByteOrder byteOrder, JBBPNamedNumericFieldMap numericFieldMap) Read a field from a stream.
-
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 nullarraySize- the array size, if it is negative one then whole stream must be readfieldName- the field name info for the VAR field, it can be null for anonymous fieldsextraValue- the extra value for the field, by default it is 0, it is the integer value after ':' char in the field typebyteOrder- the byte order for the field, it must not be nullnumericFieldMap- 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 exceptionsJBBPReachedArraySizeLimitException- 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 nullfieldName- the field name info for the VAR field, it can be null for anonymous fieldsextraValue- the extra value for the field, by default it is 0, it is the integer value after ':' char in the field typebyteOrder- the byte order for the field, it must not be nullnumericFieldMap- 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
-