com.hazelcast.nio.serialization
Class ObjectDataOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by com.hazelcast.nio.serialization.ObjectDataOutputStream
All Implemented Interfaces:
ObjectDataOutput, Closeable, DataOutput, Flushable

public class ObjectDataOutputStream
extends OutputStream
implements ObjectDataOutput, Closeable


Constructor Summary
ObjectDataOutputStream(OutputStream outputStream, SerializationService serializationService)
           
 
Method Summary
 void close()
           
 void flush()
           
 ByteOrder getByteOrder()
           
 byte[] toByteArray()
           
 void write(byte[] b)
           
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 void writeBoolean(boolean v)
           
 void writeByte(int v)
           
 void writeByteArray(byte[] bytes)
           
 void writeBytes(String s)
           
 void writeChar(int v)
           
 void writeCharArray(char[] chars)
           
 void writeChars(String s)
           
 void writeData(Data data)
           
 void writeDouble(double v)
           
 void writeDoubleArray(double[] doubles)
           
 void writeFloat(float v)
           
 void writeFloatArray(float[] floats)
           
 void writeInt(int v)
           
 void writeIntArray(int[] ints)
           
 void writeLong(long v)
           
 void writeLongArray(long[] longs)
           
 void writeObject(Object object)
           
 void writeShort(int v)
           
 void writeShortArray(short[] shorts)
           
 void writeUTF(String str)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectDataOutputStream

public ObjectDataOutputStream(OutputStream outputStream,
                              SerializationService serializationService)
Method Detail

write

public void write(int b)
           throws IOException
Specified by:
write in interface DataOutput
Specified by:
write in class OutputStream
Throws:
IOException

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Specified by:
write in interface DataOutput
Overrides:
write in class OutputStream
Throws:
IOException

writeBoolean

public void writeBoolean(boolean v)
                  throws IOException
Specified by:
writeBoolean in interface DataOutput
Throws:
IOException

writeByte

public void writeByte(int v)
               throws IOException
Specified by:
writeByte in interface DataOutput
Throws:
IOException

writeShort

public void writeShort(int v)
                throws IOException
Specified by:
writeShort in interface DataOutput
Throws:
IOException

writeChar

public void writeChar(int v)
               throws IOException
Specified by:
writeChar in interface DataOutput
Throws:
IOException

writeInt

public void writeInt(int v)
              throws IOException
Specified by:
writeInt in interface DataOutput
Throws:
IOException

writeLong

public void writeLong(long v)
               throws IOException
Specified by:
writeLong in interface DataOutput
Throws:
IOException

writeFloat

public void writeFloat(float v)
                throws IOException
Specified by:
writeFloat in interface DataOutput
Throws:
IOException

writeDouble

public void writeDouble(double v)
                 throws IOException
Specified by:
writeDouble in interface DataOutput
Throws:
IOException

writeBytes

public void writeBytes(String s)
                throws IOException
Specified by:
writeBytes in interface DataOutput
Throws:
IOException

writeChars

public void writeChars(String s)
                throws IOException
Specified by:
writeChars in interface DataOutput
Throws:
IOException

writeByteArray

public void writeByteArray(byte[] bytes)
                    throws IOException
Specified by:
writeByteArray in interface ObjectDataOutput
Parameters:
bytes - byte array to be written
Throws:
IOException

writeCharArray

public void writeCharArray(char[] chars)
                    throws IOException
Specified by:
writeCharArray in interface ObjectDataOutput
Parameters:
chars - char array to be written
Throws:
IOException

writeIntArray

public void writeIntArray(int[] ints)
                   throws IOException
Specified by:
writeIntArray in interface ObjectDataOutput
Parameters:
ints - int array to be written
Throws:
IOException

writeLongArray

public void writeLongArray(long[] longs)
                    throws IOException
Specified by:
writeLongArray in interface ObjectDataOutput
Parameters:
longs - long array to be written
Throws:
IOException

writeDoubleArray

public void writeDoubleArray(double[] doubles)
                      throws IOException
Specified by:
writeDoubleArray in interface ObjectDataOutput
Parameters:
doubles - double to be written
Throws:
IOException

writeFloatArray

public void writeFloatArray(float[] floats)
                     throws IOException
Specified by:
writeFloatArray in interface ObjectDataOutput
Parameters:
floats - float to be written
Throws:
IOException

writeShortArray

public void writeShortArray(short[] shorts)
                     throws IOException
Specified by:
writeShortArray in interface ObjectDataOutput
Parameters:
shorts - short to be written
Throws:
IOException

writeUTF

public void writeUTF(String str)
              throws IOException
Specified by:
writeUTF in interface DataOutput
Throws:
IOException

write

public void write(byte[] b)
           throws IOException
Specified by:
write in interface DataOutput
Overrides:
write in class OutputStream
Throws:
IOException

writeObject

public void writeObject(Object object)
                 throws IOException
Specified by:
writeObject in interface ObjectDataOutput
Parameters:
object - object to be written
Throws:
IOException

writeData

public void writeData(Data data)
               throws IOException
Specified by:
writeData in interface ObjectDataOutput
Parameters:
data - data to be written
Throws:
IOException

toByteArray

public byte[] toByteArray()
Specified by:
toByteArray in interface ObjectDataOutput
Returns:
copy of internal byte array

flush

public void flush()
           throws IOException
Specified by:
flush in interface Flushable
Overrides:
flush in class OutputStream
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class OutputStream
Throws:
IOException

getByteOrder

public ByteOrder getByteOrder()
Specified by:
getByteOrder in interface ObjectDataOutput
Returns:
ByteOrder BIG_ENDIAN or LITTLE_ENDIAN


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