I need to determine if a certain string is inside a PushbackInpuptStream but I need the stream pointer to be in the same point after this operation. This kind of stream does not support mark so how could one do this? Speed is not really a factor because this a low frequency operation and the stream is never going to be very large.
Just read data, and if it isn't what you want, push it back. That's what the PushbackInputStream is for.