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
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class Reader
IOException
Reader.close()
public int read(char[] buf, int from, int to) throws IOException
read
in class Reader
IOException
Reader.read(char[], int, int)
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.