Nunca utilizei mark e reset,mas posso dizer uma coisa:
Do modo q vc tá fazendo não funciona!
mark recebe como parametro readAheadLimit q é o número de chars
q pode ser lido,na verdade,o limite de seu inputbuffer.
Se usar algo maior do q seu input um novo buffer será disponibilizado cujo tamanho poderá ser maior q o limite…
Vc tá marcando readLine() ==null, q parâmetro será passado a
mark() ?
Ou seja, o buffer está vazio…
Bom estou só teorizando pois nunca reutilizei buffer antes(e posso
estar completamente errado!!!)
Mas como vc tá precisando disso urgente…
a verdadeira documentação(existe as q ignoram o parâmetro!):
public void mark(int readAheadLimit)
throws IOException
Mark the present position in the stream. Subsequent calls to reset() will attempt to reposition the stream to this point.
[quote]readAheadLimit - Limit on the number of characters that may be read while still preserving the mark. After reading this many characters, attempting to reset the stream 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.
[/quote]
Será disparada uma IllegalArgumentException se o
readAheadLimit<0