API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.io. OutputStreamWriter View Source
Author(s)
Mark Reinhold
Since
JDK1.1
Version
1.50, 06/06/07
Serial
Hierarchy
 Object
      Writer
          OutputStreamWriter
Implements
Subclasses
Description
public class OutputStreamWriter
  An OutputStreamWriter is a bridge from character streams to byte streams: Characters written to it are encoded into bytes using a specified charset.
Constructors
public OutputStreamWriter (OutputStream out)
  Creates an OutputStreamWriter that uses the default character encoding.
public OutputStreamWriter (OutputStream out, Charset cs)
  Creates an OutputStreamWriter that uses the given charset.
public OutputStreamWriter (OutputStream out, CharsetEncoder enc)
  Creates an OutputStreamWriter that uses the given charset encoder.
public OutputStreamWriter (OutputStream out, String charsetName) throws UnsupportedEncodingException
  Creates an OutputStreamWriter that uses the named charset.
Methods
public Writer append (char c) throws IOException [Inherited From Writer]
  Appends the specified character to this writer.
public Writer append (CharSequence csq) throws IOException [Inherited From Writer]
  Appends the specified character sequence to this writer.
public Writer append (CharSequence csq, int start, int end) throws IOException [Inherited From Writer]
  Appends a subsequence of the specified character sequence to this writer.
public void close () throws IOException [Specified in Writer]
public void flush () throws IOException [Specified in Writer]
  Flushes the stream.
pack-private void flushBuffer () throws IOException
  Flushes the output buffer to the underlying byte stream, without flushing the byte stream itself.
public String getEncoding ()
  Returns the name of the character encoding being used by this stream.
public void write (char[] cbuf) throws IOException [Inherited From Writer]
  Writes an array of characters.
public void write (char[] cbuf, int off, int len) throws IOException [Specified in Writer]
  Writes a portion of an array of characters.
public void write (int c) throws IOException [Overrides Writer]
  Writes a single character.
public void write (String str) throws IOException [Inherited From Writer]
  Writes a string.
public void write (String str, int off, int len) throws IOException [Overrides Writer]
  Writes a portion of a string.
Fields
protected Object lock [Inherited From Writer]
  The object used to synchronize operations on this stream.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar