Class XmlHeaderAwareReader
java.lang.Object
java.io.Reader
com.thoughtworks.xstream.core.util.XmlHeaderAwareReader
- All Implemented Interfaces:
Closeable, AutoCloseable, Readable
A
Reader that evaluates the XML header. It selects its encoding based on the encoding read with the XML
header of the provided InputStream. The default encoding is UTF-8 and the version is 1.0 if the
stream does not contain an XML header or the attributes are not set within the header.- Since:
- 1.3
- Author:
- Jörg Schaible
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Reader
nullReader, of, read, readAllAsString, readAllLines, transferTo
-
Constructor Details
-
XmlHeaderAwareReader
Constructs an XmlHeaderAwareReader.- Parameters:
in- theInputStream- Throws:
UnsupportedEncodingException- if the encoding is not supportedIOException- occurred while reading the XML header- Since:
- 1.3
-
-
Method Details
-
getEncoding
- Since:
- 1.3
- See Also:
-
getVersion
public double getVersion()- Since:
- 1.3
- See Also:
-
mark
- Overrides:
markin classReader- Throws:
IOException- See Also:
-
markSupported
public boolean markSupported()- Overrides:
markSupportedin classReader- See Also:
-
read
- Overrides:
readin classReader- Throws:
IOException- See Also:
-
read
- Specified by:
readin classReader- Throws:
IOException- See Also:
-
read
- Overrides:
readin classReader- Throws:
IOException- See Also:
-
ready
- Overrides:
readyin classReader- Throws:
IOException- See Also:
-
reset
- Overrides:
resetin classReader- Throws:
IOException- See Also:
-
skip
- Overrides:
skipin classReader- Throws:
IOException- See Also:
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classReader- Throws:
IOException- See Also:
-
equals
-
hashCode
-
toString
-