public final class XMLStreamReader extends XMLInputReader
Constructor and Description |
---|
XMLStreamReader()
Create an XMLStreamReader without providing an InputStream yet.
|
XMLStreamReader(java.io.InputStream in,
boolean rewindDeclaration)
Creates an XMLStreamReader.
|
XMLStreamReader(java.io.InputStream in,
java.lang.String encoding,
boolean rewindDeclaration)
Creates an XMLStreamReader while specifying a character encoding.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
java.lang.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(java.io.InputStream in,
java.lang.String encoding,
boolean rewindDeclaration)
Reuses this XMLStreamReader for a different InputStream.
|
long |
skip(long n) |
getXMLDeclaredEncoding, getXMLVersion, isXMLStandalone, isXMLStandaloneDeclared, parseXMLDeclaration, resetInput
public XMLStreamReader()
public XMLStreamReader(java.io.InputStream in, boolean rewindDeclaration) throws java.io.IOException
in
- the InputStreamrewindDeclaration
- a value of false will skip past any
XML declaration. True will dish out the entire document.java.io.IOException
public XMLStreamReader(java.io.InputStream in, java.lang.String encoding, boolean rewindDeclaration) throws java.io.IOException
java.io.IOException
public void reset(java.io.InputStream in, java.lang.String encoding, boolean rewindDeclaration) throws java.io.IOException
java.io.IOException
public java.lang.String getEncoding()
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.Reader
java.io.IOException
public void reset() throws java.io.IOException
reset
in class java.io.Reader
java.io.IOException
public void mark(int readAheadLimit) throws java.io.IOException
mark
in class java.io.Reader
java.io.IOException
public boolean markSupported()
markSupported
in class java.io.Reader
public int read() throws java.io.IOException
read
in class java.io.Reader
java.io.IOException
public int read(char[] destbuf) throws java.io.IOException
read
in class java.io.Reader
java.io.IOException
public int read(char[] destbuf, int off, int len) throws java.io.IOException
read
in class java.io.Reader
java.io.IOException
public boolean ready() throws java.io.IOException
ready
in class java.io.Reader
java.io.IOException
public long skip(long n) throws java.io.IOException
skip
in class java.io.Reader
java.io.IOException