java::io::CharArrayReader Class Reference

Inheritance diagram for java::io::CharArrayReader:

Inheritance graph
java::lang::Objectjava::lang::Interfacejava::io::Reader
[legend]
Collaboration diagram for java::io::CharArrayReader:

Collaboration graph
java::lang::Objectjava::lang::Interfacejava::lang::ObjectRefjava::io::Readerjava::lang::Comparable
[legend]

List of all members.


Detailed Description

This class implements a character buffer that can be used as a character-input stream.

Author:
Herb Jellinek
Version:
1.17, 12/03/01
Since:
JDK1.1

Public Member Functions

 CharArrayReader (const Ref< Array< jchar > > &buf=0, jint ofs=0, jint len=-1)
 Create an CharArrayReader from the specified array of chars.
virtual jint read ()
 Read a single character.
virtual jint read (Array< jchar > &b, jint off=0, jint len=-1)
 Read characters into a portion of an array.
virtual jlong skip (jlong n)
 Skip characters.
virtual jboolean ready ()
 Tell whether this stream is ready to be read.
virtual void close ()
 Close the stream.
virtual void mark (jint readlimit=0)
 Mark the present position in the stream.
virtual void reset ()
 Reset the stream to the most recent mark, or to the beginning if it has never been marked.
virtual jboolean markSupported ()
 Tell whether this stream supports the mark() operation, which it does.

Constructor & Destructor Documentation

java::io::CharArrayReader::CharArrayReader ( const Ref< Array< jchar > > &  buf = 0,
jint  ofs = 0,
jint  len = -1 
)

Create an CharArrayReader from the specified array of chars.

Parameters:
buf Input buffer (not copied)
ofs Offset of the first char to read
len Number of chars to read


Member Function Documentation

virtual jint java::io::CharArrayReader::read (  )  [virtual]

Read a single character.

Exceptions:
IOException If an I/O error occurs

Implements java::io::Reader.

virtual jint java::io::CharArrayReader::read ( Array< jchar > &  b,
jint  off = 0,
jint  len = -1 
) [virtual]

Read characters into a portion of an array.

Parameters:
b Destination buffer
off Offset at which to start storing characters
len Maximum number of characters to read
Returns:
The actual number of characters read, or -1 if the end of the stream has been reached
Exceptions:
IOException If an I/O error occurs

Implements java::io::Reader.

virtual jlong java::io::CharArrayReader::skip ( jlong  n  )  [virtual]

Skip characters.

Parameters:
n The number of characters to skip
Returns:
The number of characters actually skipped
Exceptions:
IOException If an I/O error occurs

Implements java::io::Reader.

virtual jboolean java::io::CharArrayReader::ready (  )  [virtual]

Tell whether this stream is ready to be read.

Character-array readers are always ready to be read.

Exceptions:
IOException If an I/O error occurs

Reimplemented from java::io::Reader.

virtual void java::io::CharArrayReader::close (  )  [virtual]

Close the stream.

Reimplemented from java::io::Reader.

virtual void java::io::CharArrayReader::mark ( jint  readlimit = 0  )  [virtual]

Mark the present position in the stream.

Subsequent calls to reset() will reposition the stream to this point.

Parameters:
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.
Exceptions:
IOException If an I/O error occurs

Reimplemented from java::io::Reader.

virtual void java::io::CharArrayReader::reset (  )  [virtual]

Reset the stream to the most recent mark, or to the beginning if it has never been marked.

Exceptions:
IOException If an I/O error occurs

Reimplemented from java::io::Reader.

virtual jboolean java::io::CharArrayReader::markSupported (  )  [virtual]

Tell whether this stream supports the mark() operation, which it does.

Reimplemented from java::io::Reader.


The documentation for this class was generated from the following file:
Generated on Fri May 16 11:56:27 2008 for CrossPlatformJavaLikeC++API by  doxygen 1.5.3