public abstract class AbstractObjectInput extends SimpleDataInput implements ObjectInput
buffer, limit, position
byteInput
Modifier | Constructor and Description |
---|---|
protected |
AbstractObjectInput(int bufferSize)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected abstract Object |
doReadObject(boolean unshared)
Implementation of the actual object-reading method.
|
Object |
readObject() |
<T> T |
readObject(Class<T> type)
Read and return an object, cast to a specific type.
|
Object |
readObjectUnshared()
Read and return an unshared object.
|
<T> T |
readObjectUnshared(Class<T> type)
Read and return an unshared object, cast to a specific type.
|
available, close, finish, read, read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readIntDirect, readLine, readLong, readLongDirect, readShort, readUnsignedByte, readUnsignedByteDirect, readUnsignedShort, readUTF, skip, skipBytes, start
mark, markSupported, reset
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes
protected AbstractObjectInput(int bufferSize)
bufferSize
- the buffer size to usepublic final Object readObject() throws ClassNotFoundException, IOException
readObject
in interface ObjectInput
ClassNotFoundException
IOException
public final Object readObjectUnshared() throws ClassNotFoundException, IOException
ClassNotFoundException
- if the class of a serialized object cannot be foundIOException
- if an error occursprotected abstract Object doReadObject(boolean unshared) throws ClassNotFoundException, IOException
unshared
- true
if the instance should be unshared, false
if it is sharedClassNotFoundException
- if the class for the object could not be loadedIOException
- if an I/O error occurspublic <T> T readObject(Class<T> type) throws ClassNotFoundException, IOException
T
- the object typetype
- the object classClassNotFoundException
- if the class of a serialized object cannot be foundInvalidObjectException
- if the object is not of the expected typeIOException
- if an error occurspublic <T> T readObjectUnshared(Class<T> type) throws ClassNotFoundException, IOException
T
- the object typetype
- the object classClassNotFoundException
- if the class of a serialized object cannot be foundInvalidObjectException
- if the object is not of the expected typeIOException
- if an error occursCopyright © 2021 JBoss by Red Hat. All rights reserved.