com.bluecast.xml
Class XMLStreamReader
public final class XMLStreamReader
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.
- Yuval Oren, yuval@bluecast.com
XMLStreamReader() - Create an XMLStreamReader without providing an InputStream yet.
|
XMLStreamReader(InputStream in, String encoding, boolean rewindDeclaration) - Creates an XMLStreamReader while specifying a character encoding.
|
XMLStreamReader(InputStream in, boolean rewindDeclaration) - Creates an XMLStreamReader.
|
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()
|
void | reset(InputStream in, String encoding, boolean rewindDeclaration) - Reuses this XMLStreamReader for a different InputStream.
|
long | skip(long n)
|
XMLStreamReader
public XMLStreamReader()
Create an XMLStreamReader without providing an InputStream yet.
You must call reset() before using.
XMLStreamReader
public XMLStreamReader(InputStream in,
String encoding,
boolean rewindDeclaration)
throws IOException
Creates an XMLStreamReader while specifying a character encoding.
XMLStreamReader
public XMLStreamReader(InputStream in,
boolean rewindDeclaration)
throws IOException
Creates an XMLStreamReader.
in
- the InputStreamrewindDeclaration
- a value of false will skip past any
XML declaration. True will dish out the entire document.
close
public void close()
throws IOException
getEncoding
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.
mark
public void mark(int readAheadLimit)
throws IOException
markSupported
public boolean markSupported()
read
public int read()
throws IOException
read
public int read(char[] destbuf)
throws IOException
read
public int read(char[] destbuf,
int off,
int len)
throws IOException
ready
public boolean ready()
throws IOException
reset
public void reset()
throws IOException
reset
public void reset(InputStream in,
String encoding,
boolean rewindDeclaration)
throws IOException
Reuses this XMLStreamReader for a different InputStream.
skip
public long skip(long n)
throws IOException