|
JBoss Marshalling 1.3.0.CR9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.marshalling.ObjectInputStreamUnmarshaller
public class ObjectInputStreamUnmarshaller

An Unmarshaller which simply wraps an object stream. Useful for retrofitting and testing applications.
| Constructor Summary | |
|---|---|
ObjectInputStreamUnmarshaller(ObjectInputStream ois)
Construct a new instance which wraps the given stream. |
|
| Method Summary | ||
|---|---|---|
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[] buf,
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[] buf)
|
|
void |
readFully(byte[] buf,
int off,
int len)
|
|
int |
readInt()
|
|
String |
readLine()
Deprecated. |
|
long |
readLong()
|
|
Object |
readObject()
|
|
|
readObject(Class<T> type)
Read and return an object, cast to a specific type. |
|
Object |
readObjectUnshared()
Read and return an unshared object. |
|
|
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 len)
|
|
void |
start(ByteInput newInput)
Begin unmarshalling from a stream. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ObjectInputStreamUnmarshaller(ObjectInputStream ois)
ois - the object stream to wrap| Method Detail |
|---|
public Object readObject()
throws IOException,
ClassNotFoundException
readObject in interface ObjectInputIOException
ClassNotFoundException
public Object readObjectUnshared()
throws IOException,
ClassNotFoundException
readObjectUnshared in interface UnmarshallerIOException - if an error occurs
ClassNotFoundException - if the class of a serialized object cannot be found
public int read()
throws IOException
read in interface ObjectInputread in interface ByteInputIOException - if an error occurs
public int read(byte[] buf,
int off,
int len)
throws IOException
read in interface ObjectInputread in interface ByteInputbuf - 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 array
IOException - if an error occurs
public int available()
throws IOException
available in interface ObjectInputavailable in interface ByteInputIOException - if an error occurs
public void close()
throws IOException
close in interface Closeableclose in interface ObjectInputIOException
public boolean readBoolean()
throws IOException
readBoolean in interface DataInputIOException
public byte readByte()
throws IOException
readByte in interface DataInputIOException
public int readUnsignedByte()
throws IOException
readUnsignedByte in interface DataInputIOException
public char readChar()
throws IOException
readChar in interface DataInputIOException
public short readShort()
throws IOException
readShort in interface DataInputIOException
public int readUnsignedShort()
throws IOException
readUnsignedShort in interface DataInputIOException
public int readInt()
throws IOException
readInt in interface DataInputIOException
public long readLong()
throws IOException
readLong in interface DataInputIOException
public float readFloat()
throws IOException
readFloat in interface DataInputIOException
public double readDouble()
throws IOException
readDouble in interface DataInputIOException
public void readFully(byte[] buf)
throws IOException
readFully in interface DataInputIOException
public void readFully(byte[] buf,
int off,
int len)
throws IOException
readFully in interface DataInputIOException
public int skipBytes(int len)
throws IOException
skipBytes in interface DataInputIOException
@Deprecated
public String readLine()
throws IOException
readLine in interface DataInputIOException
public String readUTF()
throws IOException
readUTF in interface DataInputIOException
public int read(byte[] b)
throws IOException
read in interface ObjectInputread in interface ByteInputb - the destination array
IOException - if an error occurs
public long skip(long n)
throws IOException
n 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 skip
IOException - if an error occurs
public void start(ByteInput newInput)
throws IOException
start in interface UnmarshallernewInput - the new stream
IOException - if an error occurs during setup, such as an invalid header
public void clearInstanceCache()
throws IOException
clearInstanceCache in interface UnmarshallerIOException - if an error occurs
public void clearClassCache()
throws IOException
clearClassCache in interface UnmarshallerIOException - if an error occurs
public void finish()
throws IOException
finish in interface UnmarshallerIOException - if an error occurs
public <T> T readObject(Class<T> type)
throws ClassNotFoundException,
IOException
readObject in interface UnmarshallerT - the object typetype - the object class
ClassNotFoundException - if the class of a serialized object cannot be found
InvalidObjectException - if the object is not of the expected type
IOException - if an error occurs
public <T> T readObjectUnshared(Class<T> type)
throws ClassNotFoundException,
IOException
readObjectUnshared in interface UnmarshallerT - the object typetype - the object class
ClassNotFoundException - if the class of a serialized object cannot be found
InvalidObjectException - if the object is not of the expected type
IOException - if an error occurs
|
JBoss Marshalling 1.3.0.CR9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||