public class ReaderFactory
extends java.lang.Object
Charset
,
Supported encodingsModifier and Type | Field and Description |
---|---|
static java.lang.String |
FILE_ENCODING
The
file.encoding System Property. |
static java.lang.String |
ISO_8859_1
Deprecated.
use
java.nio.charset.StandardCharset.ISO_8859_1 |
static java.lang.String |
US_ASCII
Deprecated.
use
java.nio.charset.StandardCharset.US_ASCII |
static java.lang.String |
UTF_16
Deprecated.
use
java.nio.charset.StandardCharset.UTF_16 |
static java.lang.String |
UTF_16BE
Deprecated.
use
java.nio.charset.StandardCharset.UTF_16BE |
static java.lang.String |
UTF_16LE
Deprecated.
use
java.nio.charset.StandardCharset.UTF_16LE |
static java.lang.String |
UTF_8
Deprecated.
use
java.nio.charset.StandardCharset.UTF_8 |
Constructor and Description |
---|
ReaderFactory() |
Modifier and Type | Method and Description |
---|---|
static java.io.Reader |
newPlatformReader(java.io.File file)
Deprecated.
always specify an encoding. Do not depend on the default platform character set.
|
static java.io.Reader |
newReader(java.io.File file,
java.lang.String encoding)
Create a new Reader with specified encoding.
|
static java.io.Reader |
newReader(java.io.InputStream in,
java.lang.String encoding)
Create a new Reader with specified encoding.
|
static java.io.Reader |
newReader(java.net.URL url,
java.lang.String encoding)
Create a new Reader with specified encoding.
|
static java.io.Reader |
newXmlReader(java.io.File file)
Deprecated.
use org.apache.commons.io.input.XmlStreamReader instead
|
static java.io.Reader |
newXmlReader(java.io.InputStream in)
Deprecated.
use org.apache.commons.io.input.XmlStreamReader instead
|
static java.io.Reader |
newXmlReader(java.net.URL url)
Deprecated.
use
org.apache.commons.io.input.XmlStreamReader instead |
@Deprecated public static final java.lang.String ISO_8859_1
java.nio.charset.StandardCharset.ISO_8859_1
@Deprecated public static final java.lang.String US_ASCII
java.nio.charset.StandardCharset.US_ASCII
@Deprecated public static final java.lang.String UTF_16
java.nio.charset.StandardCharset.UTF_16
@Deprecated public static final java.lang.String UTF_16BE
java.nio.charset.StandardCharset.UTF_16BE
@Deprecated public static final java.lang.String UTF_16LE
java.nio.charset.StandardCharset.UTF_16LE
@Deprecated public static final java.lang.String UTF_8
java.nio.charset.StandardCharset.UTF_8
public static final java.lang.String FILE_ENCODING
file.encoding
System Property.@Deprecated public static java.io.Reader newXmlReader(@Nonnull java.io.InputStream in) throws java.io.IOException
in
- not null input streamjava.io.IOException
- if any@Deprecated public static java.io.Reader newXmlReader(@Nonnull java.io.File file) throws java.io.IOException
file
- not null filejava.io.IOException
- if any@Deprecated public static java.io.Reader newXmlReader(@Nonnull java.net.URL url) throws java.io.IOException
org.apache.commons.io.input.XmlStreamReader
insteadurl
- not null URLjava.io.IOException
- if any@Deprecated public static java.io.Reader newPlatformReader(@Nonnull java.io.File file) throws java.io.FileNotFoundException
file
- not null file.java.io.FileNotFoundException
- if anyCharset.defaultCharset()
public static java.io.Reader newReader(@Nonnull java.io.InputStream in, @Nonnull java.lang.String encoding) throws java.io.UnsupportedEncodingException
in
- not null input streamencoding
- not null supported encodingjava.io.UnsupportedEncodingException
- if anypublic static java.io.Reader newReader(@Nonnull java.io.File file, @Nonnull java.lang.String encoding) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException
file
- not null fileencoding
- not null supported encodingjava.io.FileNotFoundException
- if anyjava.io.UnsupportedEncodingException
- if anypublic static java.io.Reader newReader(@Nonnull java.net.URL url, @Nonnull java.lang.String encoding) throws java.io.IOException
url
- not null URLencoding
- not null supported encodingjava.io.IOException
- if any