public class XMLDecoder
extends java.lang.Object
XMLDecoder reads objects from xml created by
XMLEncoder.
ObjectInputStream.
| Constructor and Description |
|---|
XMLDecoder(java.io.InputStream inputStream)
Create a decoder to read from specified input stream.
|
XMLDecoder(java.io.InputStream inputStream,
java.lang.Object owner)
Create a decoder to read from specified input stream.
|
XMLDecoder(java.io.InputStream inputStream,
java.lang.Object owner,
ExceptionListener listener)
Create a decoder to read from specified input stream.
|
XMLDecoder(java.io.InputStream inputStream,
java.lang.Object owner,
ExceptionListener listener,
java.lang.ClassLoader cl) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the input stream of xml data.
|
ExceptionListener |
getExceptionListener()
Returns the exception listener.
|
java.lang.Object |
getOwner()
Returns the owner of this decoder.
|
java.lang.Object |
readObject()
Reads the next object.
|
void |
setExceptionListener(ExceptionListener listener)
Sets the exception listener.
|
void |
setOwner(java.lang.Object owner)
Sets the owner of this decoder.
|
public XMLDecoder(java.io.InputStream inputStream)
inputStream - an input stream of xmlpublic XMLDecoder(java.io.InputStream inputStream,
java.lang.Object owner)
inputStream - an input stream of xmlowner - the owner of this decoderpublic XMLDecoder(java.io.InputStream inputStream,
java.lang.Object owner,
ExceptionListener listener)
inputStream - an input stream of xmlowner - the owner of this decoderlistener - listen to the exceptions thrown by the decoderpublic XMLDecoder(java.io.InputStream inputStream,
java.lang.Object owner,
ExceptionListener listener,
java.lang.ClassLoader cl)
public void close()
public ExceptionListener getExceptionListener()
public java.lang.Object getOwner()
public java.lang.Object readObject()
java.lang.ArrayIndexOutOfBoundsException - if no more objects to readpublic void setExceptionListener(ExceptionListener listener)
listener - an exception listenerpublic void setOwner(java.lang.Object owner)
owner - the owner of this decoder