C# implementation of PushbackInputStream -


I need Java implementation of C # pushbackInststream. I have made my very basic one, but I'm surprised That if available previously available anywhere was a well-tested and performed properly. As it happens, I always push back the same byte which I have read, in fact it only needs to be able to change backward space, I am buffering the specified number of bytes. (Such as with the Mark and reset method of Java's buffering input program).

Update: I should add that I can not restore the stream only because CanSeek is incorrect (for example when input is Steam)

The problem of pushing data back into one stream is that anyone who sits on the head of the stream Lessons already have a local buffer of data. This makes this view very brittle. Personally, I can see this scenario Try to avoid, and use data creation where I do not need to push back, or use a single-byte crop, etc.


Comments