C# Class iTextSharp.xmp.impl.PushbackReader

A character-stream reader that allows characters to be pushed back into the stream. @author Mark Reinhold @since JDK1.1
Inheritance: FilterReader
ファイルを表示 Open project: nonorganic/dssnet

Public Methods

Method Description
Close ( ) : void

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.

PushbackReader ( TextReader inp ) : System

Creates a new pushback reader with a one-character pushback buffer.

PushbackReader ( TextReader inp, int size ) : System

Creates a new pushback reader with a pushback buffer of the given size.

Read ( ) : int

Reads a single character.

Read ( char cbuf, int off, int len ) : int

Reads characters into a portion of an array.

Unread ( char cbuf ) : void

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.

Unread ( char cbuf, int off, int len ) : void

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.

Unread ( int c ) : void

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.

Private Methods

Method Description
EnsureOpen ( ) : void

Checks to make sure that the stream has not been closed.

Method Details

Close() public method

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.
If an I/O error occurs
public Close ( ) : void
return void

PushbackReader() public method

Creates a new pushback reader with a one-character pushback buffer.
public PushbackReader ( TextReader inp ) : System
inp TextReader
return System

PushbackReader() public method

Creates a new pushback reader with a pushback buffer of the given size.
if size is <= 0
public PushbackReader ( TextReader inp, int size ) : System
inp TextReader
size int The size of the pushback buffer
return System

Read() public method

Reads a single character.
If an I/O error occurs
public Read ( ) : int
return int

Read() public method

Reads characters into a portion of an array.
If an I/O error occurs
public Read ( char cbuf, int off, int len ) : int
cbuf char Destination buffer
off int Offset at which to start writing characters
len int Maximum number of characters to read ///
return int

Unread() public method

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.
If there is insufficient room in the pushback /// buffer, or if some other I/O error occurs
public Unread ( char cbuf ) : void
cbuf char Character array to push back ///
return void

Unread() public method

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.
If there is insufficient room in the pushback /// buffer, or if some other I/O error occurs
public Unread ( char cbuf, int off, int len ) : void
cbuf char Character array
off int Offset of first character to push back
len int Number of characters to push back ///
return void

Unread() public method

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.
If the pushback buffer is full, /// or if some other I/O error occurs
public Unread ( int c ) : void
c int The int value representing a character to be pushed back ///
return void