reset
. Unlike a standard InputStream
, all ImageInputStream
s support marking. Additionally, calls to mark
and reset
may be nested arbitrarily. Unlike the mark
methods declared by the Reader
and InputStream
interfaces, no readLimit
parameter is used. An arbitrary amount of data may be read following the call to mark
.
The bit position used by the readBits
method is saved and restored by each pair of calls to mark
and reset
.
Note that it is valid for an ImageReader
to call flushBefore
as part of a read operation. Therefore, if an application calls mark
prior to passing that stream to an ImageReader
, the application should not assume that the marked position will remain valid after the read operation has completed.
mark
method of InputStream
.
@param readlimit the maximum limit of bytes that can be read beforethe mark position becomes invalid.
@see java.io.BufferedInputStream#reset()
readLimit
indicates how many characters can be read before a mark is invalidated. Sending reset() will reposition the reader back to the marked position provided readLimit
has not been surpassed.
@param readlimit an int representing how many characters must be read before invalidating the mark.
@throws IOException If an error occurs attempting mark this BufferedReader.
@throws IllegalArgumentException If readlimit is < 0
readLimit
is ignored. Sending reset() will reposition the stream back to the marked position.
@param readlimit ignored.
reset
method repositions this stream at the last marked position so that subsequent reads re-read the same bytes. The readlimit
argument tells this input stream to allow that many bytes to be read before the mark position gets invalidated.
This method simply performs in.mark(readlimit)
.
@param readlimit the maximum limit of bytes that can be read beforethe mark position becomes invalid.
reset
method repositions this stream at the last marked position so that subsequent reads re-read the same bytes. The readlimit
argument tells this input stream to allow that many bytes to be read before the mark position gets invalidated.
This method simply performs in.mark(readlimit)
.
@param readlimit the maximum limit of bytes that can be read beforethe mark position becomes invalid.
@see java.io.FilterInputStream#in
@see java.io.FilterInputStream#reset()
readLimit
indicates how many bytes can be read before a mark is invalidated. Sending reset() will reposition the Stream back to the marked position provided readLimit
has not been surpassed. This default implementation does nothing and concrete subclasses must provide their own implementations. @param readlimit the number of bytes to be able to read before invalidating the mark.
The mark
method of PushbackInputStream
does nothing.
@param readlimit the maximum limit of bytes that can be read beforethe mark position becomes invalid.
@see java.io.InputStream#reset()
readLimit
indicates how many characters can be read before a mark is invalidated. Sending reset() will reposition the reader back to the marked position provided readLimit
has not been surpassed. This default implementation simply throws IOException and concrete subclasses must provide their own implementations. @param readLimit an int representing how many characters must be read before invalidating the mark. @throws IOException If an error occurs attempting mark this Reader.
reset()
.
@return This buffer
The mark
method of InflaterInputStream
does nothing.
@param readlimit the maximum limit of bytes that can be read beforethe mark position becomes invalid.
@see java.io.InputStream#reset()
reset
. Unlike a standard InputStream
, all ImageInputStream
s support marking. Additionally, calls to mark
and reset
may be nested arbitrarily. Unlike the mark
methods declared by the Reader
and InputStream
interfaces, no readLimit
parameter is used. An arbitrary amount of data may be read following the call to mark
.
The bit position used by the readBits
method is saved and restored by each pair of calls to mark
and reset
.
Note that it is valid for an ImageReader
to call flushBefore
as part of a read operation. Therefore, if an application calls mark
prior to passing that stream to an ImageReader
, the application should not assume that the marked position will remain valid after the read operation has completed.
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.
@param readlimit Not used.
@see java.io.InputStream#reset()
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.
@param readlimit the maximum limit of bytes that can be read beforethe mark position becomes invalid.
@see java.io.InputStream#reset()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|