BufferedInputStream - size of buffer, mark, reset, skip - how it works?
Rafal ZApr 16 2013 — edited Apr 16 2013Hallo,
I don't fully understand the relations of buffersize, mark and marklimit and skip of the class BufferedInptutStream. With the constructor BufferedInputStream(InputStream in, int size) I can set the size of Buffer. But what happens if I invoke the method mark(int n) where n is greater then the size of buffer used in the constructor? Does mark use own buffer, or it resizes the existing buffer?
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?
With best regards
Rafal Ziolkowski