public final class BlockUnmarshaller extends Object implements Unmarshaller, ExtendedObjectStreamConstants
TC_CLASSTABLEDESC, TC_OBJECTTABLEbaseWireHandle, PROTOCOL_VERSION_1, PROTOCOL_VERSION_2, SC_BLOCK_DATA, SC_ENUM, SC_EXTERNALIZABLE, SC_SERIALIZABLE, SC_WRITE_METHOD, STREAM_MAGIC, STREAM_VERSION, SUBCLASS_IMPLEMENTATION_PERMISSION, SUBSTITUTION_PERMISSION, TC_ARRAY, TC_BASE, TC_BLOCKDATA, TC_BLOCKDATALONG, TC_CLASS, TC_CLASSDESC, TC_ENDBLOCKDATA, TC_ENUM, TC_EXCEPTION, TC_LONGSTRING, TC_MAX, TC_NULL, TC_OBJECT, TC_PROXYCLASSDESC, TC_REFERENCE, TC_RESET, TC_STRING| Modifier and Type | Method and Description |
|---|---|
int |
available()
Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without
blocking by the next invocation of a method for this input stream.
|
void |
clearClassCache()
Discard the class cache.
|
void |
clearInstanceCache()
Discard the instance cache.
|
void |
close() |
void |
finish()
Finish unmarshalling from a stream.
|
int |
read()
Reads the next byte of data from the input stream.
|
int |
read(byte[] b)
Read some bytes from the input stream into the given array.
|
int |
read(byte[] b,
int off,
int len)
Read some bytes from the input stream into the given array.
|
boolean |
readBoolean() |
byte |
readByte() |
char |
readChar() |
double |
readDouble() |
float |
readFloat() |
void |
readFully(byte[] b) |
void |
readFully(byte[] b,
int off,
int len) |
int |
readInt() |
String |
readLine() |
long |
readLong() |
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.
|
short |
readShort() |
int |
readUnsignedByte() |
int |
readUnsignedShort() |
String |
readUTF() |
long |
skip(long n)
Skips over and discards up to
n bytes of data from this input stream. |
int |
skipBytes(int n) |
void |
start(ByteInput newInput)
Begin unmarshalling from a stream.
|
public Object readObjectUnshared() throws ClassNotFoundException, IOException
UnmarshallerreadObjectUnshared in interface UnmarshallerClassNotFoundException - if the class of a serialized object cannot be foundIOException - if an error occurspublic Object readObject() throws ClassNotFoundException, IOException
readObject in interface ObjectInputClassNotFoundExceptionIOExceptionpublic int read()
throws IOException
ByteInputread in interface ObjectInputread in interface ByteInputIOException - if an error occurspublic int read(byte[] b)
throws IOException
ByteInputread in interface ObjectInputread in interface ByteInputb - the destination arrayIOException - if an error occurspublic int read(byte[] b,
int off,
int len)
throws IOException
ByteInputread in interface ObjectInputread in interface ByteInputb - the destination arrayoff - the offset into the array into which data should be readlen - the number of bytes to attempt to fill in the destination arrayIOException - if an error occurspublic long skip(long n)
throws IOException
ByteInputn bytes of data from this input stream. If the end of stream is reached,
this method returns 0 in order to be consistent with InputStream.skip(long).skip in interface ObjectInputskip in interface ByteInputn - the number of bytes to attempt to skipIOException - if an error occurspublic int available()
throws IOException
ByteInputavailable in interface ObjectInputavailable in interface ByteInputIOException - if an error occurspublic void readFully(byte[] b)
throws IOException
readFully in interface DataInputIOExceptionpublic void readFully(byte[] b,
int off,
int len)
throws IOException
readFully in interface DataInputIOExceptionpublic int skipBytes(int n)
throws IOException
skipBytes in interface DataInputIOExceptionpublic boolean readBoolean()
throws IOException
readBoolean in interface DataInputIOExceptionpublic byte readByte()
throws IOException
readByte in interface DataInputIOExceptionpublic int readUnsignedByte()
throws IOException
readUnsignedByte in interface DataInputIOExceptionpublic short readShort()
throws IOException
readShort in interface DataInputIOExceptionpublic int readUnsignedShort()
throws IOException
readUnsignedShort in interface DataInputIOExceptionpublic char readChar()
throws IOException
readChar in interface DataInputIOExceptionpublic int readInt()
throws IOException
readInt in interface DataInputIOExceptionpublic long readLong()
throws IOException
readLong in interface DataInputIOExceptionpublic float readFloat()
throws IOException
readFloat in interface DataInputIOExceptionpublic double readDouble()
throws IOException
readDouble in interface DataInputIOExceptionpublic String readLine() throws IOException
readLine in interface DataInputIOExceptionpublic String readUTF() throws IOException
readUTF in interface DataInputIOExceptionpublic void clearInstanceCache()
throws IOException
UnmarshallerclearInstanceCache in interface UnmarshallerIOException - if an error occurspublic void clearClassCache()
throws IOException
UnmarshallerclearClassCache in interface UnmarshallerIOException - if an error occurspublic void start(ByteInput newInput) throws IOException
Unmarshallerstart in interface UnmarshallernewInput - the new streamIOException - if an error occurs during setup, such as an invalid headerpublic void finish()
throws IOException
Unmarshallerfinish in interface UnmarshallerIOException - if an error occurspublic void close()
throws IOException
close in interface Closeableclose in interface ObjectInputclose in interface AutoCloseableIOExceptionpublic <T> T readObject(Class<T> type) throws ClassNotFoundException, IOException
UnmarshallerreadObject in interface UnmarshallerT - 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
UnmarshallerreadObjectUnshared in interface UnmarshallerT - 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.