<!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.CharArrayReader
</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.ByteArrayOutputStream.html#_top_">Previous</a>  <a href="java.io.CharArrayWriter.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.io.CharArrayReader
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----<a href="java.io.Reader.html#_top_">java.io.Reader</a>
           |
           +----java.io.CharArrayReader
</pre>
<hr>
<dl>
  <dt> public class <b>CharArrayReader</b>
  <dt> extends <a href="java.io.Reader.html#_top_">Reader</a>
</dl>
This class implements a character buffer that can be used as a
 character-input stream.
<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> Character buffer
  <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#count"><b>count</b></a>
  <dd> Number of valid characters in buffer
  <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#markedPos"><b>markedPos</b></a>
  <dd> Position of mark in buffer
  <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#pos"><b>pos</b></a>
  <dd> Current buffer position
</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="#CharArrayReader(char[])"><b>CharArrayReader</b></a>(char[])
  <dd>  Create an CharArrayReader from the specified array of chars.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#CharArrayReader(char[], int, int)"><b>CharArrayReader</b></a>(char[], int, int)
  <dd>  Create an CharArrayReader from the specified array of chars.
</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="#mark(int)"><b>mark</b></a>(int)
  <dd>  Mark the present position in the stream.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#markSupported()"><b>markSupported</b></a>()
  <dd>  Tell whether this stream supports the mark() operation, which it does.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#read()"><b>read</b></a>()
  <dd>  Read a single character.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#read(char[], int, int)"><b>read</b></a>(char[], int, int)
  <dd>  Read characters into a portion of an array.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#ready()"><b>ready</b></a>()
  <dd>  Tell whether this stream is ready to be read.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#reset()"><b>reset</b></a>()
  <dd>  Reset the stream to the most recent mark, or to the beginning if it has
 never been marked.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#skip(long)"><b>skip</b></a>(long)
  <dd>  Skip characters.
</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> Character buffer<p>
</dl>
<a name="pos"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a>
<b>pos</b>
<pre>
 protected int pos
</pre>
<dl>
  <dd> Current buffer position<p>
</dl>
<a name="markedPos"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a>
<b>markedPos</b>
<pre>
 protected int markedPos
</pre>
<dl>
  <dd> Position of mark in buffer<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> Number of valid characters in buffer<p>
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="CharArrayReader"></a>
<a name="CharArrayReader(char[])"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>CharArrayReader</b>
<pre>
 public CharArrayReader(char buf[])
</pre>
<dl>
  <dd> Create an CharArrayReader from the specified array of chars.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> buf - Input buffer (not copied)
  </dl></dd>
</dl>
<a name="CharArrayReader(char[], int, int)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>CharArrayReader</b>
<pre>
 public CharArrayReader(char buf[],
                        int offset,
                        int length)
</pre>
<dl>
  <dd> Create an CharArrayReader from the specified array of chars.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> buf - Input buffer (not copied)
    <dd> offset - Offset of the first char to read
    <dd> length - Number of chars to read
  </dl></dd>
</dl>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="read()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="read"><b>read</b></a>
<pre>
 public int read() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Read a single character.
<p>
  <dd><dl>
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> If an I/O error occurs
    <dt> <b>Overrides:</b>
    <dd> <a href="java.io.Reader.html#read()">read</a> in class <a href="java.io.Reader.html#_top_">Reader</a>
  </dl></dd>
</dl>
<a name="read(char[], int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="read"><b>read</b></a>
<pre>
 public int read(char b[],
                 int off,
                 int len) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Read characters into a portion of an array.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> b - Destination buffer
    <dd> off - Offset at which to start storing characters
    <dd> len - Maximum number of characters to read
    <dt> <b>Returns:</b>
    <dd> The actual number of characters read, or -1 if
 		the end of the stream has been reached
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> If an I/O error occurs
    <dt> <b>Overrides:</b>
    <dd> <a href="java.io.Reader.html#read(char[], int, int)">read</a> in class <a href="java.io.Reader.html#_top_">Reader</a>
  </dl></dd>
</dl>
<a name="skip(long)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="skip"><b>skip</b></a>
<pre>
 public long skip(long n) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Skip characters.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> n - The number of characters to skip
    <dt> <b>Returns:</b>
    <dd> The number of characters actually skipped
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> If an I/O error occurs
    <dt> <b>Overrides:</b>
    <dd> <a href="java.io.Reader.html#skip(long)">skip</a> in class <a href="java.io.Reader.html#_top_">Reader</a>
  </dl></dd>
</dl>
<a name="ready()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="ready"><b>ready</b></a>
<pre>
 public boolean ready() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Tell whether this stream is ready to be read.  Character-array readers
 are always ready to be read.
<p>
  <dd><dl>
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> If an I/O error occurs
    <dt> <b>Overrides:</b>
    <dd> <a href="java.io.Reader.html#ready()">ready</a> in class <a href="java.io.Reader.html#_top_">Reader</a>
  </dl></dd>
</dl>
<a name="markSupported()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="markSupported"><b>markSupported</b></a>
<pre>
 public boolean markSupported()
</pre>
<dl>
  <dd> Tell whether this stream supports the mark() operation, which it does.
<p>
  <dd><dl>
    <dt> <b>Overrides:</b>
    <dd> <a href="java.io.Reader.html#markSupported()">markSupported</a> in class <a href="java.io.Reader.html#_top_">Reader</a>
  </dl></dd>
</dl>
<a name="mark(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="mark"><b>mark</b></a>
<pre>
 public void mark(int readAheadLimit) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Mark the present position in the stream.  Subsequent calls to reset()
 will reposition the stream to this point.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> readAheadLimit - Limit on the number of characters that may be
                         read while still preserving the mark.  Because
                         the stream's input comes from a character array,
                         there is no actual limit; hence this argument is
                         ignored.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> If an I/O error occurs
    <dt> <b>Overrides:</b>
    <dd> <a href="java.io.Reader.html#mark(int)">mark</a> in class <a href="java.io.Reader.html#_top_">Reader</a>
  </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() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reset the stream to the most recent mark, or to the beginning if it has
 never been marked.
<p>
  <dd><dl>
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> If an I/O error occurs
    <dt> <b>Overrides:</b>
    <dd> <a href="java.io.Reader.html#reset()">reset</a> in class <a href="java.io.Reader.html#_top_">Reader</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.
<p>
  <dd><dl>
    <dt> <b>Overrides:</b>
    <dd> <a href="java.io.Reader.html#close()">close</a> in class <a href="java.io.Reader.html#_top_">Reader</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.ByteArrayOutputStream.html#_top_">Previous</a>  <a href="java.io.CharArrayWriter.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
