public class ObjectDataOutputStream extends OutputStream implements ObjectDataOutput, Closeable
| Modifier and Type | Field and Description |
|---|---|
protected Version |
version |
protected Version |
wanProtocolVersion |
| Constructor and Description |
|---|
ObjectDataOutputStream(OutputStream outputStream,
InternalSerializationService serializationService) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
ByteOrder |
getByteOrder() |
SerializationService |
getSerializationService() |
Version |
getVersion()
If the serializer supports versioning it may set the version to use for
the intra-cluster message serialization on this object.
|
Version |
getWanProtocolVersion()
Returns the WAN protocol version.
|
void |
setVersion(Version version)
If the serializer supports versioning it may set the version to use for
the serialization on this object.
|
void |
setWanProtocolVersion(Version version)
Sets the WAN protocol version.
|
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, waitgetVersion, setVersiongetWanProtocolVersion, setWanProtocolVersionprotected Version version
protected Version wanProtocolVersion
public ObjectDataOutputStream(OutputStream outputStream, InternalSerializationService serializationService)
public void write(int b)
throws IOException
write in interface DataOutputwrite in class OutputStreamIOExceptionpublic void write(byte[] b,
int off,
int len)
throws IOException
write in interface DataOutputwrite in class OutputStreamIOExceptionpublic void writeBoolean(boolean v)
throws IOException
writeBoolean in interface DataOutputIOExceptionpublic void writeByte(int v)
throws IOException
writeByte in interface DataOutputIOExceptionpublic void writeShort(int v)
throws IOException
writeShort in interface DataOutputIOExceptionpublic void writeChar(int v)
throws IOException
writeChar in interface DataOutputIOExceptionpublic void writeInt(int v)
throws IOException
writeInt in interface DataOutputIOExceptionpublic void writeLong(long v)
throws IOException
writeLong in interface DataOutputIOExceptionpublic void writeFloat(float v)
throws IOException
writeFloat in interface DataOutputIOExceptionpublic void writeDouble(double v)
throws IOException
writeDouble in interface DataOutputIOExceptionpublic void writeBytes(String s) throws IOException
writeBytes in interface DataOutputIOExceptionpublic void writeChars(String s) throws IOException
writeChars in interface DataOutputIOExceptionpublic void writeByteArray(byte[] bytes)
throws IOException
writeByteArray in interface ObjectDataOutputbytes - byte array to be writtenIOExceptionpublic void writeBooleanArray(boolean[] booleans)
throws IOException
writeBooleanArray in interface ObjectDataOutputbooleans - boolean array to be writtenIOExceptionpublic void writeCharArray(char[] chars)
throws IOException
writeCharArray in interface ObjectDataOutputchars - char array to be writtenIOExceptionpublic void writeIntArray(int[] ints)
throws IOException
writeIntArray in interface ObjectDataOutputints - int array to be writtenIOExceptionpublic void writeLongArray(long[] longs)
throws IOException
writeLongArray in interface ObjectDataOutputlongs - long array to be writtenIOExceptionpublic void writeDoubleArray(double[] doubles)
throws IOException
writeDoubleArray in interface ObjectDataOutputdoubles - double array to be writtenIOExceptionpublic void writeFloatArray(float[] floats)
throws IOException
writeFloatArray in interface ObjectDataOutputfloats - float array to be writtenIOExceptionpublic void writeShortArray(short[] shorts)
throws IOException
writeShortArray in interface ObjectDataOutputshorts - short array to be writtenIOExceptionpublic void writeUTFArray(String[] strings) throws IOException
writeUTFArray in interface ObjectDataOutputstrings - String array to be writtenIOExceptionpublic void writeUTF(String str) throws IOException
writeUTF in interface DataOutputIOExceptionpublic void write(byte[] b)
throws IOException
write in interface DataOutputwrite in class OutputStreamIOExceptionpublic void writeObject(Object object) throws IOException
writeObject in interface ObjectDataOutputobject - object to be writtenIOExceptionpublic void writeData(Data data) throws IOException
writeData in interface ObjectDataOutputdata - data to be writtenIOExceptionpublic byte[] toByteArray()
toByteArray in interface ObjectDataOutputpublic byte[] toByteArray(int padding)
toByteArray in interface ObjectDataOutputpadding - padding bytes at the beginning of the byte-array.public void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOExceptionpublic ByteOrder getByteOrder()
getByteOrder in interface ObjectDataOutputpublic SerializationService getSerializationService()
getSerializationService in interface ObjectDataOutputpublic Version getVersion()
getVersion in interface VersionAwareVersion.UNKNOWN if the version is unknown to the object.public void setVersion(Version version)
setVersion in interface VersionAwareversion - version to setpublic void setWanProtocolVersion(Version version)
WanProtocolVersionAwareVersionAware.setVersion(Version) but is used in WAN replication,
not in message exchange inside a single cluster.setWanProtocolVersion in interface WanProtocolVersionAwareversion - the WAN protocol versionVersionAware.setVersion(Version)public Version getWanProtocolVersion()
WanProtocolVersionAwareVersionAware.getVersion() but is used in WAN replication, not in
message exchange inside a single cluster.getWanProtocolVersion in interface WanProtocolVersionAwareVersion.UNKNOWN if not setVersionAware.getVersion()Copyright © 2019 Hazelcast, Inc.. All rights reserved.