Package deltix.qsrv.hf.codec
Class EmptyUnboundEncoder
- java.lang.Object
-
- deltix.qsrv.hf.codec.EmptyUnboundEncoder
-
- All Implemented Interfaces:
FixedCodec
,FixedUnboundEncoder
,UnboundEncoder
,WritableValue
public final class EmptyUnboundEncoder extends java.lang.Object implements FixedUnboundEncoder
Date: Feb 24, 2010
-
-
Constructor Summary
Constructors Constructor Description EmptyUnboundEncoder(RecordLayout layout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
beginWrite(deltix.util.memory.MemoryDataOutput out)
void
endWrite()
Checks that NOT NULLABLE restriction was not violated (Optional).RecordClassInfo
getClassInfo()
NonStaticFieldInfo
getField()
UnboundEncoder
getFieldEncoder(RecordClassDescriptor rcd)
boolean
nextField()
WritableValue
nextWritableElement()
Returns a transient (reused by interface implementation) WritableValue object for the next element of the array.void
setArrayLength(int len)
Set length of the array.void
writeBinary(byte[] data, int offset, int length)
void
writeBoolean(boolean value)
void
writeChar(char value)
void
writeDouble(double value)
void
writeFloat(float value)
void
writeInt(int value)
void
writeLong(long value)
void
writeNull()
void
writeString(java.lang.CharSequence value)
-
-
-
Constructor Detail
-
EmptyUnboundEncoder
public EmptyUnboundEncoder(RecordLayout layout)
-
-
Method Detail
-
beginWrite
public void beginWrite(deltix.util.memory.MemoryDataOutput out)
- Specified by:
beginWrite
in interfaceFixedUnboundEncoder
-
endWrite
public void endWrite()
Description copied from interface:UnboundEncoder
Checks that NOT NULLABLE restriction was not violated (Optional).- Specified by:
endWrite
in interfaceUnboundEncoder
-
getClassInfo
public RecordClassInfo getClassInfo()
- Specified by:
getClassInfo
in interfaceFixedCodec
-
nextField
public boolean nextField()
- Specified by:
nextField
in interfaceUnboundEncoder
-
getField
public NonStaticFieldInfo getField()
- Specified by:
getField
in interfaceUnboundEncoder
-
writeBoolean
public void writeBoolean(boolean value)
- Specified by:
writeBoolean
in interfaceWritableValue
-
writeChar
public void writeChar(char value)
- Specified by:
writeChar
in interfaceWritableValue
-
writeInt
public void writeInt(int value)
- Specified by:
writeInt
in interfaceWritableValue
-
writeLong
public void writeLong(long value)
- Specified by:
writeLong
in interfaceWritableValue
-
writeFloat
public void writeFloat(float value)
- Specified by:
writeFloat
in interfaceWritableValue
-
writeDouble
public void writeDouble(double value)
- Specified by:
writeDouble
in interfaceWritableValue
-
writeString
public void writeString(java.lang.CharSequence value)
- Specified by:
writeString
in interfaceWritableValue
-
setArrayLength
public void setArrayLength(int len)
Description copied from interface:WritableValue
Set length of the array. It must be called prior to nextWritableElement- Specified by:
setArrayLength
in interfaceWritableValue
- Parameters:
len
- length of the array
-
nextWritableElement
public WritableValue nextWritableElement()
Description copied from interface:WritableValue
Returns a transient (reused by interface implementation) WritableValue object for the next element of the array.
WritableValue.setArrayLength(int)
method must be called before this method.
Client code must not cache the reference for further usage.
Usage sample:encoder.setArrayLength(10); for(int i=0; i<10; i++) { WritableValue v = encoder.nextWritableElement (i); v.setInt(i); }
- Specified by:
nextWritableElement
in interfaceWritableValue
- Returns:
- reference to WritableValue object
-
getFieldEncoder
public UnboundEncoder getFieldEncoder(RecordClassDescriptor rcd)
- Specified by:
getFieldEncoder
in interfaceWritableValue
-
writeBinary
public void writeBinary(byte[] data, int offset, int length)
- Specified by:
writeBinary
in interfaceWritableValue
-
writeNull
public void writeNull()
- Specified by:
writeNull
in interfaceWritableValue
-
-