Moyosoft Products | Services | Download | Contact us    
JavaDocPlus
Products  >  JavaDocPlus  >  Online demo    


Latest release




Get a FREE license !
(Special offer, time limited)

Review JavaDocPlus on your blog and we'll give you a free license.

Open source projects licenced under LGPL, EPL, ASL, BSD or MIT can also obtain a free license.

Contact us to check if your project/blog is eligible.

Online demo
JavaDocPlus Demo  |  Show in full page mode
   
Overview  |  
Classic JavaDoc

Class CharArrayReader

java.lang.Objectjava.io.Readerjava.io.CharArrayReader


public class CharArrayReader extends Reader

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

Author:
Herb Jellinek

Version:
1.22, 02/19/04

Since:
JDK1.1

Fields

char
buf
The character buffer.
int
count
The index of the end of this buffer. There is not valid data at or beyond this index.
int
markedPos
The position of mark in buffer.
int
pos
The current buffer position.

Constructors

public
CharArrayReader (char buf)
Create an CharArrayReader from the specified array of chars.
public
CharArrayReader (char buf, int offset, int length)
Create an CharArrayReader from the specified array of chars. The resulting reader will start reading at the given offset. The total number of char values that can be read from this reader will be either length or buf.length-offset, whichever is smaller.

Methods

void
close ()
Close the stream.
void
mark (int readAheadLimit)
Mark the present position in the stream. Subsequent calls to reset() will reposition the stream to this point.
boolean
markSupported ()
Tell whether this stream supports the mark() operation, which it does.
int
read ()
Read a single character.
int
read (char b, int off, int len)
Read characters into a portion of an array.
boolean
ready ()
Tell whether this stream is ready to be read. Character-array readers are always ready to be read.
void
reset ()
Reset the stream to the most recent mark, or to the beginning if it has never been marked.
long
skip (long n)
Skip characters. Returns the number of characters that were skipped. The n parameter may be negative, even though the skip method of the Reader superclass throws an exception in this case. If n is negative, then this method does nothing and returns 0.

Inherited methods

Community comments



Powered by JavaDocPlus