Closed sliekens closed 9 years ago
This is not actually a bug, for the following two reasons.
Stream.Position
is that it should throw System.NotSupportedException
.The only chance that this code could break is when the underlying stream does not correctly throw NotSupportException
as documented. This would be a bug in the underlying stream class, not the PushbackInputStream
class.
It might be a good idea for PushbackInputStream.Position
to implement the documented behavior instead of relying on the implementation of the underlying stream.
The
Position
property of thePushbackInputStream
class always returns the position of the underlying stream. This is wrong: the value of the underlying stream's position should be reduced with the number of pushed-back bytes.