Udostępnij za pośrednictwem


InputStream.Mark(Int32) Method

Definition

Marks the current position in this input stream.

[Android.Runtime.Register("mark", "(I)V", "GetMark_IHandler")]
public virtual void Mark (int readlimit);
[<Android.Runtime.Register("mark", "(I)V", "GetMark_IHandler")>]
abstract member Mark : int -> unit
override this.Mark : int -> unit

Parameters

readlimit
Int32

the maximum limit of bytes that can be read before the mark position becomes invalid.

Attributes

Remarks

Marks the current position in this input stream. A subsequent call to the reset method repositions this stream at the last marked position so that subsequent reads re-read the same bytes.

The readlimit arguments tells this input stream to allow that many bytes to be read before the mark position gets invalidated.

The general contract of mark is that, if the method markSupported returns true, the stream somehow remembers all the bytes read after the call to mark and stands ready to supply those same bytes again if and whenever the method reset is called. However, the stream is not required to remember any data at all if more than readlimit bytes are read from the stream before reset is called.

Marking a closed stream should not have any effect on the stream.

The mark method of InputStream does nothing.

Java documentation for java.io.InputStream.mark(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

See also