다음을 통해 공유


InputStream.SkipNBytes(Int64) Method

Definition

Skips over and discards exactly n bytes of data from this input stream.

[Android.Runtime.Register("skipNBytes", "(J)V", "GetSkipNBytes_JHandler", ApiSince=34)]
public virtual void SkipNBytes (long n);
[<Android.Runtime.Register("skipNBytes", "(J)V", "GetSkipNBytes_JHandler", ApiSince=34)>]
abstract member SkipNBytes : int64 -> unit
override this.SkipNBytes : int64 -> unit

Parameters

n
Int64

the number of bytes to be skipped.

Attributes

Remarks

Skips over and discards exactly n bytes of data from this input stream. If n is zero, then no bytes are skipped. If n is negative, then no bytes are skipped. Subclasses may handle the negative value differently.

This method blocks until the requested number of bytes has been skipped, end of file is reached, or an exception is thrown.

If end of stream is reached before the stream is at the desired position, then an EOFException is thrown.

If an I/O error occurs, then the input stream may be in an inconsistent state. It is strongly recommended that the stream be promptly closed if an I/O error occurs.

Added in 12.

Java documentation for java.io.InputStream.skipNBytes(long).

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