public class WriterFactory
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 |
---|
WriterFactory() |
Modifier and Type | Method and Description |
---|---|
static java.io.Writer |
newPlatformWriter(java.io.File file)
Deprecated.
always specify an encoding. Do not depend on the default platform character set.
|
static java.io.Writer |
newPlatformWriter(java.io.OutputStream out)
Deprecated.
always specify an encoding. Do not depend on the default platform character set.
|
static java.io.Writer |
newWriter(java.io.File file,
java.lang.String encoding)
Create a new Writer with specified encoding.
|
static java.io.Writer |
newWriter(java.io.OutputStream out,
java.lang.String encoding)
Create a new Writer with specified encoding.
|
static XmlStreamWriter |
newXmlWriter(java.io.File file)
Create a new Writer with XML encoding detection rules.
|
static XmlStreamWriter |
newXmlWriter(java.io.OutputStream out)
Create a new Writer with XML encoding detection rules.
|
@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.public static XmlStreamWriter newXmlWriter(@Nonnull java.io.OutputStream out) throws java.io.IOException
out
- not null output streamjava.io.IOException
- if anyXmlStreamWriter
public static XmlStreamWriter newXmlWriter(@Nonnull java.io.File file) throws java.io.IOException
file
- not null filejava.io.IOException
- if anyXmlStreamWriter
@Deprecated public static java.io.Writer newPlatformWriter(@Nonnull java.io.OutputStream out)
out
- not null output stream@Deprecated public static java.io.Writer newPlatformWriter(@Nonnull java.io.File file) throws java.io.IOException
file
- not null filejava.io.IOException
- if anypublic static java.io.Writer newWriter(@Nonnull java.io.OutputStream out, @Nonnull java.lang.String encoding) throws java.io.UnsupportedEncodingException
out
- not null output streamencoding
- not null supported encodingjava.io.UnsupportedEncodingException
- if anypublic static java.io.Writer newWriter(@Nonnull java.io.File file, @Nonnull java.lang.String encoding) throws java.io.UnsupportedEncodingException, java.io.FileNotFoundException
file
- not null fileencoding
- not null supported encodingjava.io.UnsupportedEncodingException
- if anyjava.io.FileNotFoundException
- if any