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

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -