java - Is PushbackInputStream an alternative for making InputStream consumable repeatedly? -
as understood, inputstream once consumed, cannot reused/ re-read back, not have content.
but, using pushbackinputstream, unread bytes read inputstream.
can use pushbackinputstream safely make inputstream consumable repeatedly?
yes, within pushback limit, , bufferedinputstream mark() , reset() features , adequate buffer, if have solution involves re-reading input, designing wrong. compiler can proceed left right along input file without ever backtracking: can you.
Comments
Post a Comment