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, resetInputpublic 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.IOExceptionpublic XMLStreamReader(java.io.InputStream in,
java.lang.String encoding,
boolean rewindDeclaration)
throws java.io.IOException
java.io.IOExceptionpublic void reset(java.io.InputStream in,
java.lang.String encoding,
boolean rewindDeclaration)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getEncoding()
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.Readerjava.io.IOExceptionpublic void reset()
throws java.io.IOException
reset in class java.io.Readerjava.io.IOExceptionpublic void mark(int readAheadLimit)
throws java.io.IOException
mark in class java.io.Readerjava.io.IOExceptionpublic boolean markSupported()
markSupported in class java.io.Readerpublic int read()
throws java.io.IOException
read in class java.io.Readerjava.io.IOExceptionpublic int read(char[] destbuf)
throws java.io.IOException
read in class java.io.Readerjava.io.IOExceptionpublic int read(char[] destbuf,
int off,
int len)
throws java.io.IOException
read in class java.io.Readerjava.io.IOExceptionpublic boolean ready()
throws java.io.IOException
ready in class java.io.Readerjava.io.IOExceptionpublic long skip(long n)
throws java.io.IOException
skip in class java.io.Readerjava.io.IOException