public abstract class AbstractObjectInput extends SimpleDataInput implements ObjectInput
buffer, limit, positionbyteInput| 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, startmark, markSupported, resetclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreadBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytesprotected AbstractObjectInput(int bufferSize)
bufferSize - the buffer size to usepublic final Object readObject() throws ClassNotFoundException, IOException
readObject in interface ObjectInputClassNotFoundExceptionIOExceptionpublic 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 © 2019 JBoss by Red Hat. All rights reserved.