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

Popular posts from this blog

html - How to custom Bootstrap grid height? -

javascript - pass values from mssql to views in node -

image - python get coordinates (pixels) of corresponding points from clicks -