public final class XmlReader extends Reader
| Constructor and Description |
|---|
XmlReader(InputStream inputStream,
String defaultEncoding)
Construct.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
String |
getEncoding()
Return the encoding used while reading the markup file.
|
void |
init()
Reads and parses markup from a resource such as file.
|
int |
read(char[] buf,
int from,
int to) |
String |
toString() |
public XmlReader(InputStream inputStream, String defaultEncoding) throws IOException
inputStream - The InputStream to read the xml data fromdefaultEncoding - Default character encoding to use when not specified in XML declaration, specify
null to use JVM defaultIOException - In case something went wrong while reading the datapublic final String getEncoding()
public void init()
throws IOException
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class ReaderIOExceptionReader.close()public int read(char[] buf,
int from,
int to)
throws IOException
read in class ReaderIOExceptionReader.read(char[], int, int)Copyright © 2006–2015 Apache Software Foundation. All rights reserved.