Method Read
Read()
Reads a single character from this reader and returns it with the two higher-order bytes set to 0. If possible, BufferedCharFilter returns a character from the buffer. If there are no characters available in the buffer, it fills the buffer and then returns a character. It returns -1 if there are no more characters in the source reader.
Declaration
public override int Read()
Returns
Type | Description |
---|---|
System.Int32 | The character read or -1 if the end of the source reader has been reached. |
Overrides
Exceptions
Type | Condition |
---|---|
System.IO.IOException | If this reader is disposed or some other I/O error occurs. |
Read(Char[], Int32, Int32)
Reads at most length
characters from this reader and stores them
at offset
in the character array buffer
. Returns the
number of characters actually read or -1 if the end of the source reader
has been reached. If all the buffered characters have been used, a mark
has not been set and the requested number of characters is larger than
this readers buffer size, BufferedReader bypasses the buffer and simply
places the results directly into buffer
.
Declaration
public override int Read(char[] buffer, int offset, int length)
Parameters
Type | Name | Description |
---|---|---|
System.Char[] | buffer | the character array to store the characters read. |
System.Int32 | offset | the initial position in |
System.Int32 | length | the maximum number of characters to read, must be non-negative. |
Returns
Type | Description |
---|---|
System.Int32 | number of characters read or -1 if the end of the source reader has been reached. |
Overrides
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | if |
System.IO.IOException | if this reader is disposed or some other I/O error occurs. |