This content has been marked as final. Show 2 replies
what happens if I invoke the method mark(int n) where n is greater then the size of buffer used in the constructor?It's supposed to work.
Does mark use own buffer, or it resizes the existing buffer?It isn't specified.
"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."
Does skip() work without using mark(), or I have to invoke mark() before I invoke skip()? Is it possibble to skip forward beyond the given buffersize/marklimit?skip() has nothing to do with mark. It just reads ahead without returning the skipped data.