Partager via


PushbackInputStream.Unread Method

Definition

Overloads

Unread(Byte[])

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

Unread(Int32)

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

Unread(Byte[], Int32, Int32)

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

Unread(Byte[])

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

[Android.Runtime.Register("unread", "([B)V", "GetUnread_arrayBHandler")]
public virtual void Unread (byte[]? b);
[<Android.Runtime.Register("unread", "([B)V", "GetUnread_arrayBHandler")>]
abstract member Unread : byte[] -> unit
override this.Unread : byte[] -> unit

Parameters

b
Byte[]

the byte array to push back

Attributes

Exceptions

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

Remarks

Pushes back an array of bytes by copying it to the front of the pushback buffer. After this method returns, the next byte to be read will have the value b[0], the byte after that will have the value b[1], and so forth.

Added in 1.1.

Java documentation for java.io.PushbackInputStream.unread(byte[]).

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 byte by copying it to the front of the pushback buffer.

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

Parameters

b
Int32

the int value whose low-order byte is to be pushed back.

Attributes

Exceptions

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

Remarks

Pushes back a byte by copying it to the front of the pushback buffer. After this method returns, the next byte to be read will have the value (byte)b.

Java documentation for java.io.PushbackInputStream.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(Byte[], Int32, Int32)

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

[Android.Runtime.Register("unread", "([BII)V", "GetUnread_arrayBIIHandler")]
public virtual void Unread (byte[]? b, int off, int len);
[<Android.Runtime.Register("unread", "([BII)V", "GetUnread_arrayBIIHandler")>]
abstract member Unread : byte[] * int * int -> unit
override this.Unread : byte[] * int * int -> unit

Parameters

b
Byte[]

the byte array to push back.

off
Int32

the start offset of the data.

len
Int32

the number of bytes to push back.

Attributes

Exceptions

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

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

Remarks

Pushes back a portion of an array of bytes by copying it to the front of the pushback buffer. After this method returns, the next byte to be read will have the value b[off], the byte after that will have the value b[off+1], and so forth.

Added in 1.1.

Java documentation for java.io.PushbackInputStream.unread(byte[], 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