Partager via


PushbackReader.Unread Method

Definition

Overloads

Unread(Char[])

Pushes back an array of characters by copying it to the front of the pushback buffer.

Unread(Int32)

Pushes back a single character by copying it to the front of the pushback buffer.

Unread(Char[], Int32, Int32)

Pushes back a portion of an array of characters by copying it to the front of the pushback buffer.

Unread(Char[])

Pushes back an array of characters by copying it to the front of the pushback buffer.

[Android.Runtime.Register("unread", "([C)V", "GetUnread_arrayCHandler")]
public virtual void Unread (char[]? cbuf);
[<Android.Runtime.Register("unread", "([C)V", "GetUnread_arrayCHandler")>]
abstract member Unread : char[] -> unit
override this.Unread : char[] -> unit

Parameters

cbuf
Char[]

Character array to push back

Attributes

Exceptions

if this reader is closed or the free space in the internal pushback buffer is not sufficient to store the contents of buffer.

Remarks

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.

Java documentation for java.io.PushbackReader.unread(char[]).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Unread(Int32)

Pushes back a single character by copying it to the front of the pushback buffer.

[Android.Runtime.Register("unread", "(I)V", "GetUnread_IHandler")]
public virtual void Unread (int c);
[<Android.Runtime.Register("unread", "(I)V", "GetUnread_IHandler")>]
abstract member Unread : int -> unit
override this.Unread : int -> unit

Parameters

c
Int32

The int value representing a character to be pushed back

Attributes

Exceptions

if this reader is closed or the internal pushback buffer is full.

Remarks

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.

Java documentation for java.io.PushbackReader.unread(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Unread(Char[], Int32, Int32)

Pushes back a portion of an array of characters by copying it to the front of the pushback buffer.

[Android.Runtime.Register("unread", "([CII)V", "GetUnread_arrayCIIHandler")]
public virtual void Unread (char[]? cbuf, int off, int len);
[<Android.Runtime.Register("unread", "([CII)V", "GetUnread_arrayCIIHandler")>]
abstract member Unread : char[] * int * int -> unit
override this.Unread : char[] * int * int -> unit

Parameters

cbuf
Char[]

Character array

off
Int32

Offset of first character to push back

len
Int32

Number of characters to push back

Attributes

Exceptions

if offset or count , or if offset + count is greater than the length of buffer.

if this reader is closed or the free space in the internal pushback buffer is not sufficient to store the selected contents of buffer.

if buffer is null.

Remarks

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.

Java documentation for java.io.PushbackReader.unread(char[], int, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to