public interface MeasurableStream
This class has two methods, both specified as optional. This apparently bizarre
behaviour is necessary because of wrapper classes which use reflection
to support those methods (see, e.g., MeasurableInputStream, FastBufferedInputStream and FastBufferedOutputStream).
long length()
throws IOException
IOExceptionlong position()
throws IOException
Usually, the position is just the number of bytes read or written
since the stream was opened, but in the case of a
RepositionableStream it
represent the current position.
IOException