public interface ObjectDataInput extends DataInput, VersionAware
Modifier and Type | Method and Description |
---|---|
ByteOrder |
getByteOrder() |
ClassLoader |
getClassLoader()
Returns class loader that internally used for objects.
|
InternalSerializationService |
getSerializationService() |
boolean[] |
readBooleanArray() |
byte[] |
readByteArray() |
char[] |
readCharArray() |
Data |
readData() |
<T> T |
readDataAsObject()
Reads to stored Data as an object instead of a Data instance.
|
double[] |
readDoubleArray() |
float[] |
readFloatArray() |
int[] |
readIntArray() |
long[] |
readLongArray() |
<T> T |
readObject() |
<T> T |
readObject(Class aClass) |
short[] |
readShortArray() |
String[] |
readUTFArray() |
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes
getVersion
byte[] readByteArray() throws IOException
IOException
- if it reaches end of file before finish readingboolean[] readBooleanArray() throws IOException
IOException
- if it reaches end of file before finish readingchar[] readCharArray() throws IOException
IOException
- if it reaches end of file before finish readingint[] readIntArray() throws IOException
IOException
- if it reaches end of file before finish readinglong[] readLongArray() throws IOException
IOException
- if it reaches end of file before finish readingdouble[] readDoubleArray() throws IOException
IOException
- if it reaches end of file before finish readingfloat[] readFloatArray() throws IOException
IOException
- if it reaches end of file before finish readingshort[] readShortArray() throws IOException
IOException
- if it reaches end of file before finish readingString[] readUTFArray() throws IOException
IOException
- if it reaches end of file before finish reading<T> T readObject() throws IOException
T
- type of the object to be readIOException
- if it reaches end of file before finish reading<T> T readDataAsObject() throws IOException
The reason this method exists is that in some cases Data
is stored on serialization, but on deserialization
the actual object instance is needed. Getting access to the Data
is easy by calling the readData()
method. But de-serializing the Data
to an object instance is impossible because there is no reference to the
SerializationService
.
T
- type of the object to be readIOException
- if it reaches end of file before finish reading<T> T readObject(Class aClass) throws IOException
T
- type of the object to be readaClass
- the type of the class to use when readingIOException
- if it reaches end of file before finish readingData readData() throws IOException
IOException
- if it reaches end of file before finish readingClassLoader getClassLoader()
ByteOrder getByteOrder()
InternalSerializationService getSerializationService()
Copyright © 2021 Hazelcast, Inc.. All Rights Reserved.