Lesson 11 | CharArrayReader class |
Objective | Explore the CharArrayReader class constructors and methods. |
CharArrayReader class and Constructors methods
The CharArrayReader
class has two constructors. The first constructs a reader from the specified array of chars
. The second constructs a reader from the specified subarray of chars
beginning at offset
and continuing for length
characters.
public CharArrayReader(char buf[])
public CharArrayReader(char buf[], int offset,
int length)
Other than these constructors, this class just has the usual reader methods:
Reader methods
read()
,
close()
, mark()
,
markSupported()
,
ready()
,
reset()
, and
skip()
.
CharArrayReaders
do support marking and resetting.