borland Packages  Class Hierarchy  jbcl.io Package  Index 

JavaOutputStreamWriter class

java.lang.Object
   +----java.io.Writer
           +----java.io.OutputStreamWriter
                   +----borland.jbcl.io.JavaOutputStreamWriter

About the JavaOutputStreamWriter class

Variables  Constructors  Properties  Methods  

This class writes characters to an output stream, translating characters into bytes according to a specified character encoding. Characters that cannot be represented in the specified encoding are represented by Unicode escape sequences. This class supports encodings that are supported by the JDK in its java.io.OutputStreamWriter class.


JavaOutputStreamWriter variables

Variables implemented in java.io.Writer

JavaOutputStreamWriter constructors

JavaOutputStreamWriter properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in java.lang.Object

JavaOutputStreamWriter methods

Methods implemented in this class

Methods implemented in java.io.Writer

Methods implemented in java.lang.Object


JavaOutputStreamWriter constructors

JavaOutputStreamWriter(java.io.OutputStream)

  public JavaOutputStreamWriter(java.io.OutputStream out)
Creates a JavaOutputStreamWriter that uses the default character encoding.

Parameters:

out
An OutputStream.

JavaOutputStreamWriter(java.io.OutputStream, java.lang.String)

  public JavaOutputStreamWriter(java.io.OutputStream out, java.lang.String enc)
Creates a JavaOutputStreamWriter that uses the named character encoding. This constructor throws a UnsupportedEncodingException if the named encoding is not supported. This class supports encodings that are supported by the JDK in its java.io.OutputStreamWriter class.

Parameters:

out
An OutputStream.
enc
The name of the encoding to use.

JavaOutputStreamWriter properties

encoding

 public String getEncoding()
Returns the name of the encoding used by this stream. Returns null if the stream has been closed.

JavaOutputStreamWriter methods

close()

  public void close()
Closes the stream. This method throws an IOException if an I/O error occurs.

Overrides: java.io.OutputStreamWriter.close()

flush()

  public void flush()
Flushes the stream. This method throws an IOException if an I/O error occurs.

Overrides: java.io.OutputStreamWriter.flush()

write(char[], int, int)

  public void write(char[] cbuf, int off, int len)
Writes a portion of an array of characters. This method throws an IOException if an I/O error occurs.

Parameters:

cbuf
The buffer of characters
off
The offset from which to start writing characters
len
The number of characters to write

Overrides: java.io.OutputStreamWriter.write(char[], int, int)

write(int)

  public void write(int c)
Writes a single character. This method throws an IOException if an I/O error occurs.

Parameters:

c
The character to write.

Overrides: java.io.OutputStreamWriter.write(int)

write(java.lang.String, int, int)

  public void write(java.lang.String str, int off, int len)
Writes a portion of a string. This method throws an IOException if an I/O error occurs.

Parameters:

str
The String to write.
off
The offset from which to start writing characters.
len
The number of characters to write.

Overrides: java.io.OutputStreamWriter.write(String, int, int)