I am trying to create a simple parser, and since the InputStream does not have any method similar to snooping, I use the sign and reset. But I suspect that consistent calls to celebrate, to cancel the previous ones. This is true? Is it possible to do something like
foo.mark(1); ... foo.mark(2); ... foo.reset(); ... foo.reset();
If not, is there any other way to simulate this or peek method?
thanks.
source share