com.devexperts.qd.kit
Class CompactIntField

java.lang.Object
  extended by com.devexperts.qd.kit.AbstractDataField
      extended by com.devexperts.qd.kit.AbstractDataIntField
          extended by com.devexperts.qd.kit.CompactIntField
All Implemented Interfaces:
DataField, DataIntField
Direct Known Subclasses:
DateField, DecimalField, SequenceField, ShortStringField, TimeField

public class CompactIntField
extends AbstractDataIntField

The CompactIntField represents an integer field with compact serialized form. It can be used for fields which are usually represented with small integer values, such as frequencies, quantities, sizes, prices, boolean and bitwise flags, etc.


Constructor Summary
CompactIntField(int index, java.lang.String name)
           
CompactIntField(int index, java.lang.String name, SerialFieldType serialType)
           
 
Method Summary
 int readInt(com.devexperts.io.BufferedInput in)
          Reads field value from specified buffered input and returns it to the caller.
 int readInt(java.io.DataInput in)
          Reads field value from specified data input and returns it to the caller.
 void writeInt(com.devexperts.io.BufferedOutput out, int value)
          Writes specified field value into specified buffered output.
 void writeInt(java.io.DataOutput out, int value)
          Writes specified field value into specified data output.
 
Methods inherited from class com.devexperts.qd.kit.AbstractDataIntField
equals, parseString, toDouble, toInt, toString
 
Methods inherited from class com.devexperts.qd.kit.AbstractDataField
getIndex, getLocalName, getName, getRecord, getSerialType, setRecord, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.devexperts.qd.DataField
getIndex, getLocalName, getName, getRecord, getSerialType
 

Constructor Detail

CompactIntField

public CompactIntField(int index,
                       java.lang.String name)

CompactIntField

public CompactIntField(int index,
                       java.lang.String name,
                       SerialFieldType serialType)
Method Detail

writeInt

public final void writeInt(java.io.DataOutput out,
                           int value)
                    throws java.io.IOException
Description copied from interface: DataIntField
Writes specified field value into specified data output.

Throws:
java.io.IOException - as specified data output does.

writeInt

public final void writeInt(com.devexperts.io.BufferedOutput out,
                           int value)
                    throws java.io.IOException
Description copied from interface: DataIntField
Writes specified field value into specified buffered output.

Throws:
java.io.IOException - as specified data output does.

readInt

public final int readInt(java.io.DataInput in)
                  throws java.io.IOException
Description copied from interface: DataIntField
Reads field value from specified data input and returns it to the caller.

Throws:
java.io.IOException - as specified data input does.

readInt

public final int readInt(com.devexperts.io.BufferedInput in)
                  throws java.io.IOException
Description copied from interface: DataIntField
Reads field value from specified buffered input and returns it to the caller.

Throws:
java.io.IOException - as specified data input does.