Closeable, DataInput, ObjectInput, AutoCloseable, ByteInputAbstractUnmarshallerpublic abstract class AbstractObjectInput extends SimpleDataInput implements ObjectInput
byteInputbuffer, limit, position| Modifier | Constructor | Description |
|---|---|---|
protected |
AbstractObjectInput(int bufferSize) |
Construct a new instance.
|
| Modifier and Type | Method | 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.
|
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytesmark, markSupported, readAllBytes, readNBytes, reset, transferToclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitavailable, close, finish, read, read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readIntDirect, readLine, readLong, readLongDirect, readShort, readUnsignedByte, readUnsignedByteDirect, readUnsignedShort, readUTF, skip, skipBytes, startprotected 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 © 2020 JBoss by Red Hat. All rights reserved.