public class XMLInputStreamReader
extends java.io.Reader
Reader
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ENCODING_ISO_8859_1
The constant "ISO-8859-1", also called "Latin-1"
|
static java.lang.String |
ENCODING_ISO_Latin_1
An alias for ENCODING_ISO_8859_1
|
static java.util.Map<java.lang.String,java.lang.String> |
ENCODING_MAP
A map to convert standard XML encodings into Java encodings.
|
static java.lang.String |
ENCODING_UTF_8
The constant "UTF-8"
|
static java.util.Map<java.lang.String,java.lang.String> |
JAVA_TO_XML_ENCODING_MAP
A map to convert standard Java encodings into XML encodings.
|
static java.util.regex.Pattern |
VERSION_PATTERN |
Constructor and Description |
---|
XMLInputStreamReader(java.io.InputStream in) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
determineEncoding()
Determine the encoding of the stream.
|
java.lang.String |
getJavaEncoding()
Get the Java name of the XML encoding of the stream.
|
java.lang.String |
getXmlEncoding()
Return the encoding of the stream
|
int |
read(char[] cbuf,
int off,
int len) |
void |
setXmlEncoding(java.lang.String xmlEncoding)
If you know the encoding, you can override it here.
|
public static final java.lang.String ENCODING_UTF_8
public static final java.lang.String ENCODING_ISO_8859_1
public static final java.lang.String ENCODING_ISO_Latin_1
public static java.util.Map<java.lang.String,java.lang.String> ENCODING_MAP
The map is mutable; you can put your own encodings in here if you need them.
public static java.util.Map<java.lang.String,java.lang.String> JAVA_TO_XML_ENCODING_MAP
The map is mutable; you can put your own encodings in here if you need them.
public static final java.util.regex.Pattern VERSION_PATTERN
public void determineEncoding()
It is safe to call this method more than once from a single thread.
public java.lang.String getXmlEncoding()
public void setXmlEncoding(java.lang.String xmlEncoding)
When you do that, the reader will ignore the encoding in the stream if there is one.
public java.lang.String getJavaEncoding()
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.Reader
java.io.IOException
public int read(char[] cbuf, int off, int len) throws java.io.IOException
read
in class java.io.Reader
java.io.IOException
Copyright © 2008-2013. All Rights Reserved.