java.lang.Object
java.io.Reader
org.apache.wicket.util.io.XmlReader
- All Implemented Interfaces:
Closeable,AutoCloseable,Readable
This is a simple XmlReader. Its only purpose is to read the xml decl string from the input and
apply proper character encoding to all subsequent characters. The xml decl string itself is
removed from the output.
- Author:
- Juergen Donnerstag
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.Reader
mark, markSupported, nullReader, read, read, read, ready, reset, skip, transferTo
-
Constructor Details
-
XmlReader
Construct.- Parameters:
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 default- Throws:
IOException- In case something went wrong while reading the data
-
-
Method Details
-
getEncoding
Return the encoding used while reading the markup file.- Returns:
- if null, then JVM default
-
init
Reads and parses markup from a resource such as file.- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classReader- Throws:
IOException- See Also:
-
read
- Specified by:
readin classReader- Throws:
IOException- See Also:
-
toString
-