Package deltix.qsrv.hf.pub.codec.intp
Class PolyUnboundEncoderImpl
- java.lang.Object
-
- deltix.qsrv.hf.pub.codec.intp.PolyUnboundEncoderImpl
-
- All Implemented Interfaces:
PolyUnboundEncoder,UnboundEncoder,WritableValue
public class PolyUnboundEncoderImpl extends java.lang.Object implements PolyUnboundEncoder
-
-
Constructor Summary
Constructors Constructor Description PolyUnboundEncoderImpl(FixedUnboundEncoder[] encoders)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbeginWrite(RecordClassDescriptor rcd, deltix.util.memory.MemoryDataOutput out)voidendWrite()Checks that NOT NULLABLE restriction was not violated (Optional).NonStaticFieldInfogetField()UnboundEncodergetFieldEncoder(RecordClassDescriptor rcd)booleannextField()WritableValuenextWritableElement()Returns a transient (reused by interface implementation) WritableValue object for the next element of the array.voidsetArrayLength(int len)Set length of the array.voidwriteBinary(byte[] data, int offset, int length)voidwriteBoolean(boolean value)voidwriteChar(char value)voidwriteDouble(double value)voidwriteFloat(float value)voidwriteInt(int value)voidwriteLong(long value)voidwriteNull()voidwriteString(java.lang.CharSequence value)
-
-
-
Constructor Detail
-
PolyUnboundEncoderImpl
public PolyUnboundEncoderImpl(FixedUnboundEncoder[] encoders)
-
-
Method Detail
-
beginWrite
public void beginWrite(RecordClassDescriptor rcd, deltix.util.memory.MemoryDataOutput out)
- Specified by:
beginWritein interfacePolyUnboundEncoder
-
endWrite
public void endWrite()
Description copied from interface:UnboundEncoderChecks that NOT NULLABLE restriction was not violated (Optional).- Specified by:
endWritein interfaceUnboundEncoder
-
writeNull
public void writeNull()
- Specified by:
writeNullin interfaceWritableValue
-
writeBinary
public void writeBinary(byte[] data, int offset, int length)- Specified by:
writeBinaryin interfaceWritableValue
-
writeString
public void writeString(java.lang.CharSequence value)
- Specified by:
writeStringin interfaceWritableValue
-
writeLong
public void writeLong(long value)
- Specified by:
writeLongin interfaceWritableValue
-
writeInt
public void writeInt(int value)
- Specified by:
writeIntin interfaceWritableValue
-
writeFloat
public void writeFloat(float value)
- Specified by:
writeFloatin interfaceWritableValue
-
writeDouble
public void writeDouble(double value)
- Specified by:
writeDoublein interfaceWritableValue
-
writeChar
public void writeChar(char value)
- Specified by:
writeCharin interfaceWritableValue
-
writeBoolean
public void writeBoolean(boolean value)
- Specified by:
writeBooleanin interfaceWritableValue
-
setArrayLength
public void setArrayLength(int len)
Description copied from interface:WritableValueSet length of the array. It must be called prior to nextWritableElement- Specified by:
setArrayLengthin interfaceWritableValue- Parameters:
len- length of the array
-
nextWritableElement
public WritableValue nextWritableElement()
Description copied from interface:WritableValueReturns 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:
nextWritableElementin interfaceWritableValue- Returns:
- reference to WritableValue object
-
getFieldEncoder
public UnboundEncoder getFieldEncoder(RecordClassDescriptor rcd)
- Specified by:
getFieldEncoderin interfaceWritableValue
-
nextField
public boolean nextField()
- Specified by:
nextFieldin interfaceUnboundEncoder
-
getField
public NonStaticFieldInfo getField()
- Specified by:
getFieldin interfaceUnboundEncoder
-
-