Package com.hazelcast.nio
Interface ObjectDataOutput
- All Superinterfaces:
DataOutput
,VersionAware
,WanProtocolVersionAware
Provides serialization methods for arrays by extending DataOutput
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
byte[]
toByteArray
(int padding) void
writeBooleanArray
(boolean[] booleans) void
writeByteArray
(byte[] bytes) void
writeCharArray
(char[] chars) void
writeDoubleArray
(double[] values) void
writeFloatArray
(float[] values) void
writeIntArray
(int[] ints) void
writeLongArray
(long[] longs) void
writeObject
(Object object) void
writeShortArray
(short[] values) void
writeString
(String string) void
writeStringArray
(String[] values) void
Deprecated.for the sake of better naming.void
writeUTFArray
(String[] values) Deprecated.for the sake of better naming.Methods inherited from interface java.io.DataOutput
write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort
Methods inherited from interface com.hazelcast.nio.VersionAware
getVersion, setVersion
Methods inherited from interface com.hazelcast.nio.WanProtocolVersionAware
getWanProtocolVersion, setWanProtocolVersion
-
Method Details
-
writeUTF
Deprecated.for the sake of better naming. UsewriteString(String)
instead- Specified by:
writeUTF
in interfaceDataOutput
- Throws:
IOException
-
writeString
- Parameters:
string
- string to be written- Throws:
IOException
- in case of any exceptional case
-
writeByteArray
- Parameters:
bytes
- byte array to be written- Throws:
IOException
- in case of any exceptional case
-
writeBooleanArray
- Parameters:
booleans
- boolean array to be written- Throws:
IOException
- in case of any exceptional case
-
writeCharArray
- Parameters:
chars
- char array to be written- Throws:
IOException
- in case of any exceptional case
-
writeIntArray
- Parameters:
ints
- int array to be written- Throws:
IOException
- in case of any exceptional case
-
writeLongArray
- Parameters:
longs
- long array to be written- Throws:
IOException
- in case of any exceptional case
-
writeDoubleArray
- Parameters:
values
- double array to be written- Throws:
IOException
- in case of any exceptional case
-
writeFloatArray
- Parameters:
values
- float array to be written- Throws:
IOException
- in case of any exceptional case
-
writeShortArray
- Parameters:
values
- short array to be written- Throws:
IOException
- in case of any exceptional case
-
writeUTFArray
Deprecated.for the sake of better naming. UsewriteStringArray(String[])
instead- Parameters:
values
- String array to be written- Throws:
IOException
- in case of any exceptional case
-
writeStringArray
- Parameters:
values
- String array to be written- Throws:
IOException
- in case of any exceptional case
-
writeObject
- Parameters:
object
- object to be written- Throws:
IOException
- in case of any exceptional case
-
toByteArray
byte[] toByteArray()- Returns:
- copy of internal byte array
-
toByteArray
byte[] toByteArray(int padding) - Parameters:
padding
- padding bytes at the beginning of the byte-array.- Returns:
- copy of internal byte array
-
getByteOrder
ByteOrder getByteOrder()- Returns:
- ByteOrder BIG_ENDIAN or LITTLE_ENDIAN
-