This class provides buffering for output streams, but it does so with purposes and an internal logic that are radically different from the ones adopted in {@link java.io.BufferedOutputStream}. The main features follow.
All methods are unsychronized.
As an additional feature, this class implements the {@link RepositionableStream} and {@link MeasurableStream} interfaces. An instance of this class will try to cast the underlying byte stream to a {@link RepositionableStream} and to fetch byreflection the {@link java.nio.channels.FileChannel} underlying the givenoutput stream, in this order. If either reference can be successfully fetched, you can use {@link #position(long)} to reposition the stream.Much in the same way, an instance of this class will try to cast the the underlying byte stream to a {@link MeasurableStream}, and if this operation is successful, or if a {@link java.nio.channels.FileChannel} canbe detected, then {@link #position()} and {@link #length()} will work as expected.
|
|
|
|