<!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.CharArrayWriter
</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.CharArrayReader.html#_top_">Previous</a>  <a href="java.io.DataInputStream.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.io.CharArrayWriter
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----<a href="java.io.Writer.html#_top_">java.io.Writer</a>
           |
           +----java.io.CharArrayWriter
</pre>
<hr>
<dl>
  <dt> public class <b>CharArrayWriter</b>
  <dt> extends <a href="java.io.Writer.html#_top_">Writer</a>
</dl>
This class implements a character buffer that can be used as an Writer.
 The buffer automatically grows when data is written to the stream.  The data
 can be retrieved using toCharArray() and toString().
<p>
<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="#buf"><b>buf</b></a>
  <dd> 
 The buffer where data is stored.
  <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#count"><b>count</b></a>
  <dd>  The number of chars in the buffer.
</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="#CharArrayWriter()"><b>CharArrayWriter</b></a>()
  <dd>  Creates a new CharArrayWriter.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#CharArrayWriter(int)"><b>CharArrayWriter</b></a>(int)
  <dd>  Creates a new CharArrayWriter with the specified initial size.
</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.
  <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="#reset()"><b>reset</b></a>()
  <dd>  Resets the buffer so that you can use it again without
 throwing away the already allocated buffer.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#size()"><b>size</b></a>()
  <dd>  Returns the current size of the buffer.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#toCharArray()"><b>toCharArray</b></a>()
  <dd>  Returns a copy of the input data.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#toString()"><b>toString</b></a>()
  <dd>  Converts input data to a string.
  <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>  Writes characters to the buffer.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#write(int)"><b>write</b></a>(int)
  <dd>  Writes a character to the buffer.
  <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 to the buffer.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#writeTo(java.io.Writer)"><b>writeTo</b></a>(Writer)
  <dd>  Writes the contents of the buffer to another character stream.
</dl>
<a name="variables"></a>
<h2>
  <img src="images/variables.gif" width=153 height=38 alt="Variables">
</h2>
<a name="buf"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a>
<b>buf</b>
<pre>
 protected char buf[]
</pre>
<dl>
  <dd> The buffer where data is stored.<p>
</dl>
<a name="count"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a>
<b>count</b>
<pre>
 protected int count
</pre>
<dl>
  <dd> The number of chars in the buffer.<p>
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="CharArrayWriter"></a>
<a name="CharArrayWriter()"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>CharArrayWriter</b>
<pre>
 public CharArrayWriter()
</pre>
<dl>
  <dd> Creates a new CharArrayWriter.
<p>
</dl>
<a name="CharArrayWriter(int)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>CharArrayWriter</b>
<pre>
 public CharArrayWriter(int initialSize)
</pre>
<dl>
  <dd> Creates a new CharArrayWriter with the specified initial size.
<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)
</pre>
<dl>
  <dd> Writes a character to the buffer.
<p>
  <dd><dl>
    <dt> <b>Overrides:</b>
    <dd> <a href="java.io.Writer.html#write(int)">write</a> in class <a href="java.io.Writer.html#_top_">Writer</a>
  </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 void write(char c[],
                   int off,
                   int len)
</pre>
<dl>
  <dd> Writes characters to the buffer.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> c - the data to be written
    <dd> off - the start offset in the data
    <dd> len - the number of chars that are written
    <dt> <b>Overrides:</b>
    <dd> <a href="java.io.Writer.html#write(char[], int, int)">write</a> in class <a href="java.io.Writer.html#_top_">Writer</a>
  </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)
</pre>
<dl>
  <dd> Write a portion of a string to the buffer.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> str - String to be written from
    <dd> off - Offset from which to start reading characters
    <dd> len - Number of characters to be written
    <dt> <b>Overrides:</b>
    <dd> <a href="java.io.Writer.html#write(java.lang.String, int, int)">write</a> in class <a href="java.io.Writer.html#_top_">Writer</a>
  </dl></dd>
</dl>
<a name="writeTo(java.io.Writer)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="writeTo"><b>writeTo</b></a>
<pre>
 public void writeTo(<a href="java.io.Writer.html#_top_">Writer</a> out) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Writes the contents of the buffer to another character stream.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> out - the output stream to write to
  </dl></dd>
</dl>
<a name="reset()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="reset"><b>reset</b></a>
<pre>
 public void reset()
</pre>
<dl>
  <dd> Resets the buffer so that you can use it again without
 throwing away the already allocated buffer.
<p>
</dl>
<a name="toCharArray()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="toCharArray"><b>toCharArray</b></a>
<pre>
 public char[] toCharArray()
</pre>
<dl>
  <dd> Returns a copy of the input data.
<p>
</dl>
<a name="size()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="size"><b>size</b></a>
<pre>
 public int size()
</pre>
<dl>
  <dd> Returns the current size of the buffer.
<p>
</dl>
<a name="toString()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="toString"><b>toString</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> toString()
</pre>
<dl>
  <dd> Converts input data to a string.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the string.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.lang.Object.html#toString()">toString</a> in class <a href="java.lang.Object.html#_top_">Object</a>
  </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 void flush()
</pre>
<dl>
  <dd> Flush the stream.
<p>
  <dd><dl>
    <dt> <b>Overrides:</b>
    <dd> <a href="java.io.Writer.html#flush()">flush</a> in class <a href="java.io.Writer.html#_top_">Writer</a>
  </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 void close()
</pre>
<dl>
  <dd> Close the stream.  This method does not release the buffer, since its
 contents might still be required.
<p>
  <dd><dl>
    <dt> <b>Overrides:</b>
    <dd> <a href="java.io.Writer.html#close()">close</a> in class <a href="java.io.Writer.html#_top_">Writer</a>
  </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.CharArrayReader.html#_top_">Previous</a>  <a href="java.io.DataInputStream.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
