A character-stream reader that allows characters to be pushed back into the stream. More...
|
|
PushbackReader (TextReader inp, int size) |
|
Creates a new pushback reader with a pushback buffer of the given size. More...
|
|
|
PushbackReader (TextReader inp) |
|
Creates a new pushback reader with a one-character pushback buffer. More...
|
|
override int |
Read () |
|
Reads a single character. More...
|
|
override int |
Read (char[] cbuf, int off, int len) |
|
Reads characters into a portion of an array. More...
|
|
virtual void |
Unread (int c) |
|
Pushes back a single character by copying it to the front of the pushback buffer. After this method returns, the next character to be read will have the value More...
|
|
virtual void |
Unread (char[] cbuf, int off, int len) |
|
Pushes back a portion of an array of characters by copying it to the front of the pushback buffer. After this method returns, the next character to be read will have the value More...
|
|
virtual void |
Unread (char[] cbuf) |
|
Pushes back an array of characters by copying it to the front of the pushback buffer. After this method returns, the next character to be read will have the value More...
|
|
override int |
Read () |
|
Reads a single character. More...
|
|
override int |
Read (char[] cbuf, int off, int len) |
|
Reads characters into a portion of an array. More...
|
|
|
override void |
Dispose (bool disposing) |
|
Closes the stream and releases any system resources associated with it. Once the stream has been closed, further read(), unread(), ready(), or skip() invocations will throw an IOException. Closing a previously closed stream has no effect. More...
|
|
|
FilterReader (TextReader inp) |
|
override void |
Dispose (bool disposing) |
|
A character-stream reader that allows characters to be pushed back into the stream.
-
Author
-
Mark Reinhold
-
Since
-
JDK1.1
◆ PushbackReader() [1/2]
iText.Commons.Utils.PushbackReader.PushbackReader |
( |
TextReader |
inp, |
|
|
int |
size |
|
) |
|
|
|
inline |
Creates a new pushback reader with a pushback buffer of the given size.
-
Parameters
-
in |
The reader from which characters will be read |
size |
The size of the pushback buffer |
◆ PushbackReader() [2/2]
iText.Commons.Utils.PushbackReader.PushbackReader |
( |
TextReader |
inp |
) |
|
|
inline |
Creates a new pushback reader with a one-character pushback buffer.
-
Parameters
-
in |
The reader from which characters will be read |
◆ Dispose()
override void iText.Commons.Utils.PushbackReader.Dispose |
( |
bool |
disposing |
) |
|
|
inlineprotected |
Closes the stream and releases any system resources associated with it. Once the stream has been closed, further read(), unread(), ready(), or skip() invocations will throw an IOException. Closing a previously closed stream has no effect.
◆ Read() [1/2]
override int iText.Commons.Utils.PushbackReader.Read |
( |
|
) |
|
|
inline |
Reads a single character.
-
Returns
-
The character read, or -1 if the end of the stream has been reached
◆ Read() [2/2]
override int iText.Commons.Utils.PushbackReader.Read |
( |
char[] |
cbuf, |
|
|
int |
off, |
|
|
int |
len |
|
) |
|
|
|
inline |
Reads characters into a portion of an array.
-
Parameters
-
cbuf |
Destination buffer |
off |
Offset at which to start writing characters |
len |
Maximum number of characters to read |
-
Returns
-
The number of characters read, or -1 if the end of the stream has been reached
◆ Unread() [1/3]
virtual void iText.Commons.Utils.PushbackReader.Unread |
( |
char[] |
cbuf |
) |
|
|
inlinevirtual |
Pushes back an array of characters by copying it to the front of the pushback buffer. After this method returns, the next character to be read will have the value
cbuf[0]
, the character after that will have the value cbuf[1]
, and so forth.
-
Parameters
-
cbuf |
Character array to push back |
◆ Unread() [2/3]
virtual void iText.Commons.Utils.PushbackReader.Unread |
( |
char[] |
cbuf, |
|
|
int |
off, |
|
|
int |
len |
|
) |
|
|
|
inlinevirtual |
Pushes back a portion of an array of characters by copying it to the front of the pushback buffer. After this method returns, the next character to be read will have the value
cbuf[off]
, the character after that will have the value cbuf[off+1]
, and so forth.
-
Parameters
-
cbuf |
Character array |
off |
Offset of first character to push back |
len |
Number of characters to push back |
◆ Unread() [3/3]
virtual void iText.Commons.Utils.PushbackReader.Unread |
( |
int |
c |
) |
|
|
inlinevirtual |
Pushes back a single character by copying it to the front of the pushback buffer. After this method returns, the next character to be read will have the value
(char)c
.
-
Parameters
-
c |
The int value representing a character to be pushed back |