|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.hazelcast.nio.serialization.DefaultPortableWriter
public class DefaultPortableWriter
Constructor Summary | |
---|---|
DefaultPortableWriter(com.hazelcast.nio.serialization.PortableSerializer serializer,
BufferObjectDataOutput out,
ClassDefinition cd)
|
Method Summary | |
---|---|
ObjectDataOutput |
getRawDataOutput()
After writing portable fields, one can write remaining fields in old fashioned way consecutively at the end of stream. |
int |
getVersion()
|
void |
writeBoolean(String fieldName,
boolean value)
Writes a primitive boolean. |
void |
writeByte(String fieldName,
byte value)
Writes a primitive byte. |
void |
writeByteArray(String fieldName,
byte[] values)
Writes a primitive byte-array. |
void |
writeChar(String fieldName,
int value)
Writes a primitive char. |
void |
writeCharArray(String fieldName,
char[] values)
Writes a primitive char-array. |
void |
writeDouble(String fieldName,
double value)
Writes a primitive double. |
void |
writeDoubleArray(String fieldName,
double[] values)
Writes a primitive double array. |
void |
writeFloat(String fieldName,
float value)
Writes a primitive float. |
void |
writeFloatArray(String fieldName,
float[] values)
Writes a primitive float array. |
void |
writeInt(String fieldName,
int value)
Writes a primitive int. |
void |
writeIntArray(String fieldName,
int[] values)
Writes a primitive int-array. |
void |
writeLong(String fieldName,
long value)
Writes a primitive long. |
void |
writeLongArray(String fieldName,
long[] values)
Writes a primitive long-array. |
void |
writeNullPortable(String fieldName,
int factoryId,
int classId)
To write a null portable value, user needs to provide class and factoryIds of related class. |
void |
writePortable(String fieldName,
Portable portable)
Writes a Portable. |
void |
writePortableArray(String fieldName,
Portable[] portables)
Writes a an array of Portables. |
void |
writeShort(String fieldName,
short value)
Writes a primitive short. |
void |
writeShortArray(String fieldName,
short[] values)
Writes a primitive short-array. |
void |
writeUTF(String fieldName,
String str)
Writes an UTF string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultPortableWriter(com.hazelcast.nio.serialization.PortableSerializer serializer, BufferObjectDataOutput out, ClassDefinition cd) throws IOException
IOException
Method Detail |
---|
public int getVersion()
public void writeInt(String fieldName, int value) throws IOException
PortableWriter
writeInt
in interface PortableWriter
fieldName
- name of the fieldvalue
- int value to be written
IOException
public void writeLong(String fieldName, long value) throws IOException
PortableWriter
writeLong
in interface PortableWriter
fieldName
- name of the fieldvalue
- long value to be written
IOException
public void writeUTF(String fieldName, String str) throws IOException
PortableWriter
writeUTF
in interface PortableWriter
fieldName
- name of the fieldstr
- utf string value to be written
IOException
public void writeBoolean(String fieldName, boolean value) throws IOException
PortableWriter
writeBoolean
in interface PortableWriter
fieldName
- name of the fieldvalue
- int value to be written
IOException
public void writeByte(String fieldName, byte value) throws IOException
PortableWriter
writeByte
in interface PortableWriter
fieldName
- name of the fieldvalue
- int value to be written
IOException
public void writeChar(String fieldName, int value) throws IOException
PortableWriter
writeChar
in interface PortableWriter
fieldName
- name of the fieldvalue
- int value to be written
IOException
public void writeDouble(String fieldName, double value) throws IOException
PortableWriter
writeDouble
in interface PortableWriter
fieldName
- name of the fieldvalue
- int value to be written
IOException
public void writeFloat(String fieldName, float value) throws IOException
PortableWriter
writeFloat
in interface PortableWriter
fieldName
- name of the fieldvalue
- int value to be written
IOException
public void writeShort(String fieldName, short value) throws IOException
PortableWriter
writeShort
in interface PortableWriter
fieldName
- name of the fieldvalue
- int value to be written
IOException
public void writePortable(String fieldName, Portable portable) throws IOException
PortableWriter
writePortable
in interface PortableWriter
fieldName
- name of the fieldportable
- Portable to be written
IOException
public void writeNullPortable(String fieldName, int factoryId, int classId) throws IOException
PortableWriter
writeNullPortable
in interface PortableWriter
fieldName
- name of the fieldfactoryId
- factory id of related portable classclassId
- class id of related portable class
IOException
public void writeByteArray(String fieldName, byte[] values) throws IOException
PortableWriter
writeByteArray
in interface PortableWriter
fieldName
- name of the fieldvalues
- byte array to be written
IOException
public void writeCharArray(String fieldName, char[] values) throws IOException
PortableWriter
writeCharArray
in interface PortableWriter
fieldName
- name of the fieldvalues
- char array to be written
IOException
public void writeIntArray(String fieldName, int[] values) throws IOException
PortableWriter
writeIntArray
in interface PortableWriter
fieldName
- name of the fieldvalues
- int array to be written
IOException
public void writeLongArray(String fieldName, long[] values) throws IOException
PortableWriter
writeLongArray
in interface PortableWriter
fieldName
- name of the fieldvalues
- long array to be written
IOException
public void writeDoubleArray(String fieldName, double[] values) throws IOException
PortableWriter
writeDoubleArray
in interface PortableWriter
fieldName
- name of the fieldvalues
- double array to be written
IOException
public void writeFloatArray(String fieldName, float[] values) throws IOException
PortableWriter
writeFloatArray
in interface PortableWriter
fieldName
- name of the fieldvalues
- float array to be written
IOException
public void writeShortArray(String fieldName, short[] values) throws IOException
PortableWriter
writeShortArray
in interface PortableWriter
fieldName
- name of the fieldvalues
- short array to be written
IOException
public void writePortableArray(String fieldName, Portable[] portables) throws IOException
PortableWriter
writePortableArray
in interface PortableWriter
fieldName
- name of the fieldportables
- portable array to be written
IOException
public ObjectDataOutput getRawDataOutput() throws IOException
PortableWriter
getRawDataOutput
in interface PortableWriter
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |