You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
InputStreamReader gives up if it can't find a Window in the cache from a position which has already been read, and throws a WindowMissingException. This is because you can't rewind streams, so if it isn't in the cache, we can't get the data.
If the underlying InputStream supported mark / reset, we have the possibility of rewinding the stream.
It still may fail, but then we just might get another IOException - instead of the guaranteed WindowMissingException (which is an IOException).
If it succeeds, we can read forward again in the stream to obtain the missing data.
The text was updated successfully, but these errors were encountered:
The simple implementation is to call mark() immediately on any stream we get (which we also assume is position 0).
Then we are relying on the underlying implementation being able to rewind the stream back to the point we got it, even if we've subsequently read a lot of data.
If it can't do that, it will fail sometimes. Whether failing every time is better than failing sometimes is something which only a user can answer - it depends on what is being used for.
InputStreamReader gives up if it can't find a Window in the cache from a position which has already been read, and throws a WindowMissingException. This is because you can't rewind streams, so if it isn't in the cache, we can't get the data.
If the underlying InputStream supported mark / reset, we have the possibility of rewinding the stream.
It still may fail, but then we just might get another IOException - instead of the guaranteed WindowMissingException (which is an IOException).
If it succeeds, we can read forward again in the stream to obtain the missing data.
The text was updated successfully, but these errors were encountered: