<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Wed Jul 28 01:21:15 GMT 1999 -->
<title>
  Class java.io.Writer
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.io.html">This Package</a>  <a href="java.io.StringWriter.html#_top_">Previous</a>  <a href="Package-java.io.html">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.io.Writer
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----java.io.Writer
</pre>
<hr>
<dl>
  <dt> public abstract class <b>Writer</b>
  <dt> extends <a href="java.lang.Object.html#_top_">Object</a>
</dl>
Abstract class for writing to character streams.  The only methods that a
 subclass must implement are write(char[], int, int), flush(), and close().
 Most subclasses, however, will override some of the methods defined here in
 order to provide higher efficiency, additional functionality, or both.
<p>
<dl>
    <dt> <b>See Also:</b>
    <dd> <a href="#_top_">Writer</a>, <a href="java.io.BufferedWriter.html#_top_">BufferedWriter</a>, <a href="java.io.CharArrayWriter.html#_top_">CharArrayWriter</a>, <a href="java.io.FilterWriter.html#_top_">FilterWriter</a>, <a href="java.io.OutputStreamWriter.html#_top_">OutputStreamWriter</a>, <a href="java.io.FileWriter.html#_top_">FileWriter</a>, <a href="java.io.PipedWriter.html#_top_">PipedWriter</a>, <a href="java.io.PrintWriter.html#_top_">PrintWriter</a>, <a href="java.io.StringWriter.html#_top_">StringWriter</a>, <a href="java.io.Reader.html#_top_">Reader</a>
</dl>
<hr>
<a name="index"></a>
<h2>
  <img src="images/variable-index.gif" width=207 height=38 alt="Variable Index">
</h2>
<dl>
  <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#lock"><b>lock</b></a>
  <dd>  The object used to synchronize operations on this stream.
</dl>
<h2>
  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#Writer()"><b>Writer</b></a>()
  <dd>  Create a new character-stream writer whose critical sections will
 synchronize on the writer itself.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#Writer(java.lang.Object)"><b>Writer</b></a>(Object)
  <dd>  Create a new character-stream writer whose critical sections will
 synchronize on the given object.
</dl>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#close()"><b>close</b></a>()
  <dd>  Close the stream, flushing it first.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#flush()"><b>flush</b></a>()
  <dd>  Flush the stream.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#write(char[])"><b>write</b></a>(char[])
  <dd>  Write an array of characters.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#write(char[], int, int)"><b>write</b></a>(char[], int, int)
  <dd>  Write a portion of an array of characters.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#write(int)"><b>write</b></a>(int)
  <dd>  Write a single character.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#write(java.lang.String)"><b>write</b></a>(String)
  <dd>  Write a string.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#write(java.lang.String, int, int)"><b>write</b></a>(String, int, int)
  <dd>  Write a portion of a string.
</dl>
<a name="variables"></a>
<h2>
  <img src="images/variables.gif" width=153 height=38 alt="Variables">
</h2>
<a name="lock"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a>
<b>lock</b>
<pre>
 protected <a href="java.lang.Object.html#_top_">Object</a> lock
</pre>
<dl>
  <dd> The object used to synchronize operations on this stream.  For
 efficiency, a character-stream object may use an object other than
 itself to protect critical sections.  A subclass should therefore use
 the object in this field rather than <tt>this</tt> or a synchronized
 method.<p>
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="Writer"></a>
<a name="Writer()"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>Writer</b>
<pre>
 protected Writer()
</pre>
<dl>
  <dd> Create a new character-stream writer whose critical sections will
 synchronize on the writer itself.
<p>
</dl>
<a name="Writer(java.lang.Object)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>Writer</b>
<pre>
 protected Writer(<a href="java.lang.Object.html#_top_">Object</a> lock)
</pre>
<dl>
  <dd> Create a new character-stream writer whose critical sections will
 synchronize on the given object.
<p>
</dl>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="write(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="write"><b>write</b></a>
<pre>
 public void write(int c) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Write a single character.  The character to be written is contained in
 the 16 low-order bits of the given integer value; the 16 high-order bits
 are ignored.
 <p> Subclasses that intend to support efficient single-character output
 should override this method.
<p>
  <dd><dl>
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> If an I/O error occurs
  </dl></dd>
</dl>
<a name="write(char[])"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="write"><b>write</b></a>
<pre>
 public void write(char cbuf[]) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Write an array of characters.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> cbuf - Array of characters to be written
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> If an I/O error occurs
  </dl></dd>
</dl>
<a name="write(char[], int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="write"><b>write</b></a>
<pre>
 public abstract void write(char cbuf[],
                            int off,
                            int len) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Write a portion of an array of characters.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> cbuf - Array of characters
    <dd> off - Offset from which to start writing characters
    <dd> len - Number of characters to write
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> If an I/O error occurs
  </dl></dd>
</dl>
<a name="write(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="write"><b>write</b></a>
<pre>
 public void write(<a href="java.lang.String.html#_top_">String</a> str) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Write a string.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> str - String to be written
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> If an I/O error occurs
  </dl></dd>
</dl>
<a name="write(java.lang.String, int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="write"><b>write</b></a>
<pre>
 public void write(<a href="java.lang.String.html#_top_">String</a> str,
                   int off,
                   int len) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Write a portion of a string.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> str - A String
    <dd> off - Offset from which to start writing characters
    <dd> len - Number of characters to write
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> If an I/O error occurs
  </dl></dd>
</dl>
<a name="flush()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="flush"><b>flush</b></a>
<pre>
 public abstract void flush() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Flush the stream.  If the stream has saved any characters from the
 various write() methods in a buffer, write them immediately to their
 intended destination.  Then, if that destination is another character or
 byte stream, flush it.  Thus one flush() invocation will flush all the
 buffers in a chain of Writers and OutputStreams.
<p>
  <dd><dl>
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> If an I/O error occurs
  </dl></dd>
</dl>
<a name="close()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="close"><b>close</b></a>
<pre>
 public abstract void close() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Close the stream, flushing it first.  Once a stream has been closed,
 further write() or flush() invocations will cause an IOException to be
 thrown.  Closing a previously-closed stream, however, has no effect.
<p>
  <dd><dl>
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> If an I/O error occurs
  </dl></dd>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.io.html">This Package</a>  <a href="java.io.StringWriter.html#_top_">Previous</a>  <a href="Package-java.io.html">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
