다음을 통해 공유


Reader.NullReader Method

Definition

Returns a new Reader that reads no characters.

[Android.Runtime.Register("nullReader", "()Ljava/io/Reader;", "", ApiSince=33)]
public static Java.IO.Reader? NullReader ();
[<Android.Runtime.Register("nullReader", "()Ljava/io/Reader;", "", ApiSince=33)>]
static member NullReader : unit -> Java.IO.Reader

Returns

a Reader which reads no characters

Attributes

Remarks

Returns a new Reader that reads no characters. The returned stream is initially open. The stream is closed by calling the close() method. Subsequent calls to close() have no effect.

While the stream is open, the read(), read(char[]), read(char[], int, int), read(Charbuffer), ready(), skip(long), and transferTo() methods all behave as if end of stream has been reached. After the stream has been closed, these methods all throw IOException.

The markSupported() method returns false. The mark() and reset() methods throw an IOException.

The #lock object used to synchronize operations on the returned Reader is not specified.

Added in 11.

Java documentation for java.io.Reader.nullReader().

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