com.hazelcast.nio.serialization
Class DefaultPortableWriter

java.lang.Object
  extended by com.hazelcast.nio.serialization.DefaultPortableWriter
All Implemented Interfaces:
PortableWriter

public class DefaultPortableWriter
extends Object
implements PortableWriter

Author:
mdogan 12/26/12

Constructor Summary
DefaultPortableWriter(com.hazelcast.nio.serialization.PortableSerializer serializer, com.hazelcast.nio.BufferObjectDataOutput out, ClassDefinition cd)
           
 
Method Summary
 com.hazelcast.nio.ObjectDataOutput getRawDataOutput()
           
 int getVersion()
           
 void writeBoolean(String fieldName, boolean value)
           
 void writeByte(String fieldName, byte value)
           
 void writeByteArray(String fieldName, byte[] values)
           
 void writeChar(String fieldName, int value)
           
 void writeCharArray(String fieldName, char[] values)
           
 void writeDouble(String fieldName, double value)
           
 void writeDoubleArray(String fieldName, double[] values)
           
 void writeFloat(String fieldName, float value)
           
 void writeFloatArray(String fieldName, float[] values)
           
 void writeInt(String fieldName, int value)
           
 void writeIntArray(String fieldName, int[] values)
           
 void writeLong(String fieldName, long value)
           
 void writeLongArray(String fieldName, long[] values)
           
 void writeNullPortable(String fieldName, int factoryId, int classId)
           
 void writePortable(String fieldName, Portable portable)
           
 void writePortableArray(String fieldName, Portable[] portables)
           
 void writeShort(String fieldName, short value)
           
 void writeShortArray(String fieldName, short[] values)
           
 void writeUTF(String fieldName, String str)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPortableWriter

public DefaultPortableWriter(com.hazelcast.nio.serialization.PortableSerializer serializer,
                             com.hazelcast.nio.BufferObjectDataOutput out,
                             ClassDefinition cd)
                      throws IOException
Throws:
IOException
Method Detail

getVersion

public int getVersion()
Specified by:
getVersion in interface PortableWriter

writeInt

public void writeInt(String fieldName,
                     int value)
              throws IOException
Specified by:
writeInt in interface PortableWriter
Throws:
IOException

writeLong

public void writeLong(String fieldName,
                      long value)
               throws IOException
Specified by:
writeLong in interface PortableWriter
Throws:
IOException

writeUTF

public void writeUTF(String fieldName,
                     String str)
              throws IOException
Specified by:
writeUTF in interface PortableWriter
Throws:
IOException

writeBoolean

public void writeBoolean(String fieldName,
                         boolean value)
                  throws IOException
Specified by:
writeBoolean in interface PortableWriter
Throws:
IOException

writeByte

public void writeByte(String fieldName,
                      byte value)
               throws IOException
Specified by:
writeByte in interface PortableWriter
Throws:
IOException

writeChar

public void writeChar(String fieldName,
                      int value)
               throws IOException
Specified by:
writeChar in interface PortableWriter
Throws:
IOException

writeDouble

public void writeDouble(String fieldName,
                        double value)
                 throws IOException
Specified by:
writeDouble in interface PortableWriter
Throws:
IOException

writeFloat

public void writeFloat(String fieldName,
                       float value)
                throws IOException
Specified by:
writeFloat in interface PortableWriter
Throws:
IOException

writeShort

public void writeShort(String fieldName,
                       short value)
                throws IOException
Specified by:
writeShort in interface PortableWriter
Throws:
IOException

writePortable

public void writePortable(String fieldName,
                          Portable portable)
                   throws IOException
Specified by:
writePortable in interface PortableWriter
Throws:
IOException

writeNullPortable

public void writeNullPortable(String fieldName,
                              int factoryId,
                              int classId)
                       throws IOException
Specified by:
writeNullPortable in interface PortableWriter
Throws:
IOException

writeByteArray

public void writeByteArray(String fieldName,
                           byte[] values)
                    throws IOException
Specified by:
writeByteArray in interface PortableWriter
Throws:
IOException

writeCharArray

public void writeCharArray(String fieldName,
                           char[] values)
                    throws IOException
Specified by:
writeCharArray in interface PortableWriter
Throws:
IOException

writeIntArray

public void writeIntArray(String fieldName,
                          int[] values)
                   throws IOException
Specified by:
writeIntArray in interface PortableWriter
Throws:
IOException

writeLongArray

public void writeLongArray(String fieldName,
                           long[] values)
                    throws IOException
Specified by:
writeLongArray in interface PortableWriter
Throws:
IOException

writeDoubleArray

public void writeDoubleArray(String fieldName,
                             double[] values)
                      throws IOException
Specified by:
writeDoubleArray in interface PortableWriter
Throws:
IOException

writeFloatArray

public void writeFloatArray(String fieldName,
                            float[] values)
                     throws IOException
Specified by:
writeFloatArray in interface PortableWriter
Throws:
IOException

writeShortArray

public void writeShortArray(String fieldName,
                            short[] values)
                     throws IOException
Specified by:
writeShortArray in interface PortableWriter
Throws:
IOException

writePortableArray

public void writePortableArray(String fieldName,
                               Portable[] portables)
                        throws IOException
Specified by:
writePortableArray in interface PortableWriter
Throws:
IOException

getRawDataOutput

public com.hazelcast.nio.ObjectDataOutput getRawDataOutput()
                                                    throws IOException
Specified by:
getRawDataOutput in interface PortableWriter
Throws:
IOException


Copyright © 2014 Hazelcast, Inc.. All Rights Reserved.