|
J avolution v3.7 (J2SE 1.5+) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.InputStream
javolution.xml.XmlInputStream<T>
public class XmlInputStream<T>
This class represents an object input stream using ObjectReader
for object deserialization.
Instances of this class embed their own data buffer, wrapping using
a java.io.BufferedInputStream is therefore unnescessary.
XmlOutputStream| Constructor Summary | |
|---|---|
XmlInputStream()
Default constructor. |
|
XmlInputStream(ObjectReader<T> reader)
Creates a xml input stream using the specified object reader. |
|
| Method Summary | |
|---|---|
void |
close()
Closes and resets this stream for reuse. |
int |
read()
Reads the next byte of data from the input stream. |
int |
read(byte[] b,
int off,
int len)
Reads up to len bytes of data from the input stream into an array of bytes. |
T |
readObject()
Reads an object from the underlying stream using an ObjectReader. |
void |
reset()
Resets the internal state of this object to its default values. |
XmlInputStream |
setInputStream(java.io.InputStream in)
Sets the underlying input source for this stream. |
| Methods inherited from class java.io.InputStream |
|---|
available, mark, markSupported, read, skip |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XmlInputStream()
public XmlInputStream(ObjectReader<T> reader)
reader - the object reader.| Method Detail |
|---|
public XmlInputStream setInputStream(java.io.InputStream in)
in - the input source.
this
java.lang.IllegalStateException - if this stream is being reused and
it has not been closed or reset.
public T readObject()
throws java.io.IOException
ObjectReader.
java.io.IOException - if an I/O error occurs.
public void close()
throws java.io.IOException
resets this stream for reuse.
close in interface java.io.Closeableclose in class java.io.InputStreamjava.io.IOException - if an I/O error occurs.
public int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOException - if an I/O error occurs.
public int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.io.InputStreamb - the buffer into which the data is read.off - the start offset in array b at which the data is written.len - the maximum number of bytes to read.
java.io.IOException - if an I/O error occurs.public void reset()
Reusable
reset in interface Reusablereset in class java.io.InputStream
|
J avolution v3.7 (J2SE 1.5+) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||