Readers Writers  «Prev  Next»


Lesson 11CharArrayReader class
ObjectiveExplore 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

  1. read(),
  2. close(), mark(),
  3. markSupported(),
  4. ready(),
  5. reset(), and
  6. skip().
  7. CharArrayReaders
do support marking and resetting.