public class DefaultPortableWriter extends Object implements PortableWriter
| Constructor and Description | 
|---|
| DefaultPortableWriter(com.hazelcast.internal.serialization.impl.PortableSerializer serializer,
                     BufferObjectDataOutput out,
                     ClassDefinition cd) | 
| Modifier and Type | Method and Description | 
|---|---|
| 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 | writeBooleanArray(String fieldName,
                 boolean[] booleans)Writes a primitive boolean-array. | 
| 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. | 
| void | writeUTFArray(String fieldName,
             String[] values)Writes a String-array. | 
public DefaultPortableWriter(com.hazelcast.internal.serialization.impl.PortableSerializer serializer,
                     BufferObjectDataOutput out,
                     ClassDefinition cd)
                      throws IOException
IOExceptionpublic int getVersion()
public void writeInt(String fieldName, int value) throws IOException
PortableWriterwriteInt in interface PortableWriterfieldName - name of the fieldvalue - int value to be writtenIOExceptionpublic void writeLong(String fieldName, long value) throws IOException
PortableWriterwriteLong in interface PortableWriterfieldName - name of the fieldvalue - long value to be writtenIOExceptionpublic void writeUTF(String fieldName, String str) throws IOException
PortableWriterwriteUTF in interface PortableWriterfieldName - name of the fieldstr - utf string value to be writtenIOExceptionpublic void writeBoolean(String fieldName, boolean value) throws IOException
PortableWriterwriteBoolean in interface PortableWriterfieldName - name of the fieldvalue - int value to be writtenIOExceptionpublic void writeByte(String fieldName, byte value) throws IOException
PortableWriterwriteByte in interface PortableWriterfieldName - name of the fieldvalue - int value to be writtenIOExceptionpublic void writeChar(String fieldName, int value) throws IOException
PortableWriterwriteChar in interface PortableWriterfieldName - name of the fieldvalue - int value to be writtenIOExceptionpublic void writeDouble(String fieldName, double value) throws IOException
PortableWriterwriteDouble in interface PortableWriterfieldName - name of the fieldvalue - int value to be writtenIOExceptionpublic void writeFloat(String fieldName, float value) throws IOException
PortableWriterwriteFloat in interface PortableWriterfieldName - name of the fieldvalue - int value to be writtenIOExceptionpublic void writeShort(String fieldName, short value) throws IOException
PortableWriterwriteShort in interface PortableWriterfieldName - name of the fieldvalue - int value to be writtenIOExceptionpublic void writePortable(String fieldName, Portable portable) throws IOException
PortableWriterwritePortable in interface PortableWriterfieldName - name of the fieldportable - Portable to be writtenIOExceptionpublic void writeNullPortable(String fieldName, int factoryId, int classId) throws IOException
PortableWriterwriteNullPortable in interface PortableWriterfieldName - name of the fieldfactoryId - factory id of related portable classclassId - class id of related portable classIOExceptionpublic void writeByteArray(String fieldName, byte[] values) throws IOException
PortableWriterwriteByteArray in interface PortableWriterfieldName - name of the fieldvalues - byte array to be writtenIOExceptionpublic void writeBooleanArray(String fieldName, boolean[] booleans) throws IOException
PortableWriterwriteBooleanArray in interface PortableWriterfieldName - name of the fieldbooleans - boolean array to be writtenIOExceptionpublic void writeCharArray(String fieldName, char[] values) throws IOException
PortableWriterwriteCharArray in interface PortableWriterfieldName - name of the fieldvalues - char array to be writtenIOExceptionpublic void writeIntArray(String fieldName, int[] values) throws IOException
PortableWriterwriteIntArray in interface PortableWriterfieldName - name of the fieldvalues - int array to be writtenIOExceptionpublic void writeLongArray(String fieldName, long[] values) throws IOException
PortableWriterwriteLongArray in interface PortableWriterfieldName - name of the fieldvalues - long array to be writtenIOExceptionpublic void writeDoubleArray(String fieldName, double[] values) throws IOException
PortableWriterwriteDoubleArray in interface PortableWriterfieldName - name of the fieldvalues - double array to be writtenIOExceptionpublic void writeFloatArray(String fieldName, float[] values) throws IOException
PortableWriterwriteFloatArray in interface PortableWriterfieldName - name of the fieldvalues - float array to be writtenIOExceptionpublic void writeShortArray(String fieldName, short[] values) throws IOException
PortableWriterwriteShortArray in interface PortableWriterfieldName - name of the fieldvalues - short array to be writtenIOExceptionpublic void writeUTFArray(String fieldName, String[] values) throws IOException
PortableWriterwriteUTFArray in interface PortableWriterfieldName - name of the fieldvalues - String array to be writtenIOExceptionpublic void writePortableArray(String fieldName, Portable[] portables) throws IOException
PortableWriterwritePortableArray in interface PortableWriterfieldName - name of the fieldportables - portable array to be writtenIOExceptionpublic ObjectDataOutput getRawDataOutput() throws IOException
PortableWritergetRawDataOutput in interface PortableWriterIOExceptionCopyright © 2016 Hazelcast, Inc.. All Rights Reserved.