org.codehaus.plexus.util
Class WriterFactory

java.lang.Object
  extended by org.codehaus.plexus.util.WriterFactory

Deprecated. TO BE REMOVED from here when plexus-utils is upgraded to 1.4.5+ (and prerequisite upgraded to Maven 2.0.6)

public class WriterFactory
extends Object

Utility to create Writers, with explicit encoding choice: platform default, XML, or specified.

Since:
1.4.4
Version:
$Id: WriterFactory.java 630430 2008-02-23 13:16:25Z olamy $
Author:
Herve Boutemy
See Also:
Charset, Supported encodings

Field Summary
static String FILE_ENCODING
          Deprecated. The file.encoding System Property.
static String ISO_8859_1
          Deprecated. ISO Latin Alphabet #1, also known as ISO-LATIN-1.
static String US_ASCII
          Deprecated. Seven-bit ASCII, also known as ISO646-US, also known as the Basic Latin block of the Unicode character set.
static String UTF_16
          Deprecated. Sixteen-bit Unicode Transformation Format, byte order specified by a mandatory initial byte-order mark (either order accepted on input, big-endian used on output).
static String UTF_16BE
          Deprecated. Sixteen-bit Unicode Transformation Format, big-endian byte order.
static String UTF_16LE
          Deprecated. Sixteen-bit Unicode Transformation Format, little-endian byte order.
static String UTF_8
          Deprecated. Eight-bit Unicode Transformation Format.
 
Constructor Summary
WriterFactory()
          Deprecated.  
 
Method Summary
static Writer newPlatformWriter(File file)
          Deprecated. Create a new Writer with default plaform encoding.
static Writer newPlatformWriter(OutputStream out)
          Deprecated. Create a new Writer with default plaform encoding.
static Writer newWriter(File file, String encoding)
          Deprecated. Create a new Writer with specified encoding.
static Writer newWriter(OutputStream out, String encoding)
          Deprecated. Create a new Writer with specified encoding.
static XmlStreamWriter newXmlWriter(File file)
          Deprecated. Create a new Writer with XML encoding detection rules.
static XmlStreamWriter newXmlWriter(OutputStream out)
          Deprecated. Create a new Writer with XML encoding detection rules.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ISO_8859_1

public static final String ISO_8859_1
Deprecated. 
ISO Latin Alphabet #1, also known as ISO-LATIN-1. Every implementation of the Java platform is required to support this character encoding.

See Also:
Charset, Constant Field Values

US_ASCII

public static final String US_ASCII
Deprecated. 
Seven-bit ASCII, also known as ISO646-US, also known as the Basic Latin block of the Unicode character set. Every implementation of the Java platform is required to support this character encoding.

See Also:
Charset, Constant Field Values

UTF_16

public static final String UTF_16
Deprecated. 
Sixteen-bit Unicode Transformation Format, byte order specified by a mandatory initial byte-order mark (either order accepted on input, big-endian used on output). Every implementation of the Java platform is required to support this character encoding.

See Also:
Charset, Constant Field Values

UTF_16BE

public static final String UTF_16BE
Deprecated. 
Sixteen-bit Unicode Transformation Format, big-endian byte order. Every implementation of the Java platform is required to support this character encoding.

See Also:
Charset, Constant Field Values

UTF_16LE

public static final String UTF_16LE
Deprecated. 
Sixteen-bit Unicode Transformation Format, little-endian byte order. Every implementation of the Java platform is required to support this character encoding.

See Also:
Charset, Constant Field Values

UTF_8

public static final String UTF_8
Deprecated. 
Eight-bit Unicode Transformation Format. Every implementation of the Java platform is required to support this character encoding.

See Also:
Charset, Constant Field Values

FILE_ENCODING

public static final String FILE_ENCODING
Deprecated. 
The file.encoding System Property.

Constructor Detail

WriterFactory

public WriterFactory()
Deprecated. 
Method Detail

newXmlWriter

public static XmlStreamWriter newXmlWriter(OutputStream out)
                                    throws IOException
Deprecated. 
Create a new Writer with XML encoding detection rules.

Throws:
IOException
See Also:
XmlStreamWriter

newXmlWriter

public static XmlStreamWriter newXmlWriter(File file)
                                    throws IOException
Deprecated. 
Create a new Writer with XML encoding detection rules.

Throws:
IOException
See Also:
XmlStreamWriter

newPlatformWriter

public static Writer newPlatformWriter(OutputStream out)
Deprecated. 
Create a new Writer with default plaform encoding.


newPlatformWriter

public static Writer newPlatformWriter(File file)
                                throws IOException
Deprecated. 
Create a new Writer with default plaform encoding.

Throws:
IOException

newWriter

public static Writer newWriter(OutputStream out,
                               String encoding)
                        throws UnsupportedEncodingException
Deprecated. 
Create a new Writer with specified encoding.

Throws:
UnsupportedEncodingException
See Also:
Supported encodings

newWriter

public static Writer newWriter(File file,
                               String encoding)
                        throws UnsupportedEncodingException,
                               FileNotFoundException
Deprecated. 
Create a new Writer with specified encoding.

Throws:
UnsupportedEncodingException
FileNotFoundException
See Also:
Supported encodings


Copyright © 2004-2008 The Apache Software Foundation. All Rights Reserved.