Package deltix.qsrv.hf.pub
Interface WritableValue
-
- All Known Subinterfaces:
FixedUnboundEncoder,MixedWritableValue,PolyUnboundEncoder,UnboundEncoder
- All Known Implementing Classes:
BooleanValueBean,DefaultValueEncoder,DoubleValueBean,EmptyUnboundEncoder,FixedUnboundEncoderImpl,FloatValueBean,IgnoreWriter,IntegerValueBean,PolyUnboundEncoderImpl,PropertySupport,StringValueBean,ValueBean,WritableValueDelegate,WritableValueImpl
public interface WritableValueWrite access to a value.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description UnboundEncodergetFieldEncoder(RecordClassDescriptor rcd)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)
-
-
-
Method Detail
-
writeBoolean
void writeBoolean(boolean value)
-
writeChar
void writeChar(char value)
-
writeInt
void writeInt(int value)
-
writeLong
void writeLong(long value)
-
writeFloat
void writeFloat(float value)
-
writeDouble
void writeDouble(double value)
-
writeString
void writeString(java.lang.CharSequence value)
-
setArrayLength
void setArrayLength(int len)
Set length of the array. It must be called prior to nextWritableElement- Parameters:
len- length of the array
-
nextWritableElement
WritableValue nextWritableElement()
Returns a transient (reused by interface implementation) WritableValue object for the next element of the array.
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); }- Returns:
- reference to WritableValue object
- Throws:
java.util.NoSuchElementException- when when the next element lays beyond array boundary
-
getFieldEncoder
UnboundEncoder getFieldEncoder(RecordClassDescriptor rcd)
-
writeBinary
void writeBinary(byte[] data, int offset, int length)
-
writeNull
void writeNull()
-
-