|
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.Objectjavolution.xml.ObjectReader<T>
public class ObjectReader<T>
This class restores objects which have been serialized in XML
format using an ObjectWriter.
When the XML document is parsed, each elements are recursively
processed and Java objects are created using the XmlFormat
of the class identified by the name of the XML element.
The final object constructed (and returned) is always the root element
of the XML input source.
Non-blank character data of the XML document are represented
by CharacterData instances.
| Constructor Summary | |
|---|---|
ObjectReader()
Default constructor. |
|
| Method Summary | |
|---|---|
T |
read(java.nio.ByteBuffer byteBuffer)
Creates an object from its XML representation read from the specified ByteBuffer. |
T |
read(java.io.InputStream in)
Creates an object from its XML representation read from the specified InputStream. |
T |
read(java.io.Reader reader)
Creates an object from its XML representation read from the specified Reader. |
void |
reset()
Resets this object reader; objects previously read cannot be refered to, they will have to be send again. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ObjectReader()
| Method Detail |
|---|
public T read(java.io.Reader reader)
throws XmlException
Reader. This method reads until the
end of stream; to read multiple objects over a persistent connection
XmlInputStream should be used instead.
reader - the reader containing the XML representation of the
object being created.
XmlException - if the object cannot be created.
public T read(java.io.InputStream in)
throws XmlException
InputStream. This method reads until the
end of stream; to read multiple objects over a persistent connection
XmlInputStream should be used instead.
in - the input stream containing the XML representation of the
object being created.
XmlException - if the object cannot be created.
public T read(java.nio.ByteBuffer byteBuffer)
throws XmlException
ByteBuffer. This method reads from
the current buffer position up to the buffer's limit.
byteBuffer - the byte buffer containing the XML representation
of the object being created.
XmlException - if the object cannot be created.public void reset()
reset in interface Reusable
|
J avolution v3.7 (J2SE 1.5+) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||