public class ObjectDataOutputStream extends OutputStream implements ObjectDataOutput, Closeable
Constructor and Description |
---|
ObjectDataOutputStream(OutputStream outputStream,
InternalSerializationService serializationService) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush() |
ByteOrder |
getByteOrder() |
Version |
getVersion()
If the serializer supports versioning it may set the version to use for the serialization on this object.
|
void |
setVersion(Version version)
If the serializer supports versioning it may set the version to use for the serialization on this object.
|
byte[] |
toByteArray() |
byte[] |
toByteArray(int padding) |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
void |
writeBoolean(boolean v) |
void |
writeBooleanArray(boolean[] booleans) |
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) |
void |
writeUTFArray(String[] strings) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getVersion
protected Version version
public ObjectDataOutputStream(OutputStream outputStream, InternalSerializationService serializationService)
public void write(int b) throws IOException
write
in interface DataOutput
write
in class OutputStream
IOException
public void write(byte[] b, int off, int len) throws IOException
write
in interface DataOutput
write
in class OutputStream
IOException
public void writeBoolean(boolean v) throws IOException
writeBoolean
in interface DataOutput
IOException
public void writeByte(int v) throws IOException
writeByte
in interface DataOutput
IOException
public void writeShort(int v) throws IOException
writeShort
in interface DataOutput
IOException
public void writeChar(int v) throws IOException
writeChar
in interface DataOutput
IOException
public void writeInt(int v) throws IOException
writeInt
in interface DataOutput
IOException
public void writeLong(long v) throws IOException
writeLong
in interface DataOutput
IOException
public void writeFloat(float v) throws IOException
writeFloat
in interface DataOutput
IOException
public void writeDouble(double v) throws IOException
writeDouble
in interface DataOutput
IOException
public void writeBytes(String s) throws IOException
writeBytes
in interface DataOutput
IOException
public void writeChars(String s) throws IOException
writeChars
in interface DataOutput
IOException
public void writeByteArray(byte[] bytes) throws IOException
writeByteArray
in interface ObjectDataOutput
bytes
- byte array to be writtenIOException
public void writeBooleanArray(boolean[] booleans) throws IOException
writeBooleanArray
in interface ObjectDataOutput
booleans
- boolean array to be writtenIOException
public void writeCharArray(char[] chars) throws IOException
writeCharArray
in interface ObjectDataOutput
chars
- char array to be writtenIOException
public void writeIntArray(int[] ints) throws IOException
writeIntArray
in interface ObjectDataOutput
ints
- int array to be writtenIOException
public void writeLongArray(long[] longs) throws IOException
writeLongArray
in interface ObjectDataOutput
longs
- long array to be writtenIOException
public void writeDoubleArray(double[] doubles) throws IOException
writeDoubleArray
in interface ObjectDataOutput
doubles
- double array to be writtenIOException
public void writeFloatArray(float[] floats) throws IOException
writeFloatArray
in interface ObjectDataOutput
floats
- float array to be writtenIOException
public void writeShortArray(short[] shorts) throws IOException
writeShortArray
in interface ObjectDataOutput
shorts
- short array to be writtenIOException
public void writeUTFArray(String[] strings) throws IOException
writeUTFArray
in interface ObjectDataOutput
strings
- String array to be writtenIOException
public void writeUTF(String str) throws IOException
writeUTF
in interface DataOutput
IOException
public void write(byte[] b) throws IOException
write
in interface DataOutput
write
in class OutputStream
IOException
public void writeObject(Object object) throws IOException
writeObject
in interface ObjectDataOutput
object
- object to be writtenIOException
public void writeData(Data data) throws IOException
writeData
in interface ObjectDataOutput
data
- data to be writtenIOException
public byte[] toByteArray()
toByteArray
in interface ObjectDataOutput
public byte[] toByteArray(int padding)
toByteArray
in interface ObjectDataOutput
padding
- padding bytes at the beginning of the byte-array.public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
public ByteOrder getByteOrder()
getByteOrder
in interface ObjectDataOutput
public void setVersion(Version version)
version
- version to setpublic Version getVersion()
getVersion
in interface VersionAware
Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.