mark

open fun mark(readAheadLimit: Int)

Marks the present position in the stream. Subsequent calls to reset() will attempt to reposition the stream to this point.

Parameters

readAheadLimit

Limit on the number of characters that may be read while still preserving the mark. An attempt to reset the stream after reading characters up to this limit or beyond may fail. A limit value larger than the size of the input buffer will cause a new buffer to be allocated whose size is no smaller than limit. Therefore large values should be used with care.

Throws

If readAheadLimit < 0

IOException

If an I/O error occurs