StringReader.read

Overview | Methods | This Package | All Packages

StringReader.read

Reads the next character from the underlying string.

Syntax

public int read()

public int read( char[] buffer, int index, int count )

Parameters

buffer

The character array to read data into.

index

The starting index in the buffer.

count

The number of characters to read.

Return Value

Returns the next character from the underlying string, or returns -1 if no further characters are available. The second syntax returns the total number of characters read into the buffer. This may be less than the number of characters requested if that many characters aren't currently available, or zero if the end of the underlying string is reached.

Exceptions

WFCInvalidArgumentException thrown if the buffer is null, the index is out of bounds, or the count is out of bounds.

Remarks

This method reads up to count characters from this TextReader into the buffer character array starting at position index. Returns the actual number of characters read.

Overrides   Reader.read