com.bluecast.xml
Class XMLStreamReader
public final
class
XMLStreamReader
extends XMLInputReader
A Reader for XML documents and streams. This class automatically determines
the proper character set to use based on Byte Order Marks and XML
declarations.
Version: $Revision: 1.7 $
Author: Yuval Oren, yuval@bluecast.com
Constructor Summary |
| XMLStreamReader()
Create an XMLStreamReader without providing an InputStream yet.
|
| XMLStreamReader(InputStream in, boolean rewindDeclaration)
Creates an XMLStreamReader.
|
| XMLStreamReader(InputStream in, String encoding, boolean rewindDeclaration)
Creates an XMLStreamReader while specifying a character encoding. |
Method Summary |
void | close() |
String | getEncoding() Returns the character set being used by the reader. |
void | mark(int readAheadLimit) |
boolean | markSupported() |
int | read() |
int | read(char[] destbuf) |
int | read(char[] destbuf, int off, int len) |
boolean | ready() |
void | reset(InputStream in, String encoding, boolean rewindDeclaration)
Reuses this XMLStreamReader for a different InputStream. |
void | reset() |
long | skip(long n) |
public XMLStreamReader()
Create an XMLStreamReader without providing an InputStream yet.
You must call reset() before using.
public XMLStreamReader(InputStream in, boolean rewindDeclaration)
Creates an XMLStreamReader.
Parameters: in the InputStream rewindDeclaration a value of false will skip past any
XML declaration. True will dish out the entire document.
public XMLStreamReader(InputStream in, String encoding, boolean rewindDeclaration)
Creates an XMLStreamReader while specifying a character encoding.
public void close()
public String getEncoding()
Returns the character set being used by the reader. Note that the
encoding in the XML declaration is ignored if it is not needed to
determine the character set.
public void mark(int readAheadLimit)
public boolean markSupported()
public int read()
public int read(char[] destbuf)
public int read(char[] destbuf, int off, int len)
public boolean ready()
public void reset(InputStream in, String encoding, boolean rewindDeclaration)
Reuses this XMLStreamReader for a different InputStream.
public void reset()
public long skip(long n)