img
Method
Description
abstract void close( )
Closes the input source. Fur ther read attempts will generate
an IOException.
void mark(int numChars)
Places a mark at the current point in the input stream that will
remain valid until numChars characters are read.
boolean markSuppor ted( )
Returns true if mark( )/reset( ) are suppor ted on this stream.
int read( )
Returns an integer representation of the next available character
from the invoking input stream. ­1 is returned when the end of
the file is encountered.
int read(char buf fer[ ])
Attempts to read up to buf fer.length characters into buf fer and
returns the actual number of characters that were successfully
read. ­1 is returned when the end of the file is encountered.
abstract int read(char buf fer[ ],  Attempts to read up to numChars characters into buf fer star ting
int of fset,
at buf fer[of fset], returning the number of characters
int numChars) successfully read. ­1 is returned when the end of the file is
encountered.
boolean ready( )
Returns true if the next input request will not wait. Other wise,
it returns false.
void reset( )
Resets the input pointer to the previously set mark.
long skip(long numChars)
Skips over numChars characters of input, returning the number
of characters actually skipped.
TABLE 19-3
The Methods Defined by Reader
Method
Description
Writer append(char ch)
Appends ch to the end of the invoking output
stream. Returns a reference to the invoking
stream.
Writer append(CharSequence chars)
Appends chars to the end of the invoking output
stream. Returns a reference to the invoking
stream.
Writer append(CharSequence chars, int begin,
Appends the subrange of chars specified by
int end)
begin and end­1 to the end of the invoking
ouput stream. Returns a reference to the
invoking stream.
abstract void close( )
Closes the output stream. Fur ther write
attempts will generate an IOException.
abstract void flush( )
Finalizes the output state so that any buf fers
are cleared. That is, it flushes the output
buf fers.
void write(int ch)
Writes a single character to the invoking output
stream. Note that the parameter is an int, which
allows you to call write with expressions without
having to cast them back to char.
TABLE 19-4
The Methods Defined by Writer
Search WWH :
Custom Search
Previous Page
Java SE 6 Topic Index
Next Page
Java SE 6 Bookmarks
Home