Package org.apache.commons.io.channels
Class FilterReadableByteChannel<C extends ReadableByteChannel>
java.lang.Object
org.apache.commons.io.channels.FilterChannel<C>
org.apache.commons.io.channels.FilterReadableByteChannel<C>
- Type Parameters:
C- theReadableByteChanneltype.
- All Implemented Interfaces:
Closeable,AutoCloseable,Channel,ReadableByteChannel
public class FilterReadableByteChannel<C extends ReadableByteChannel>
extends FilterChannel<C>
implements ReadableByteChannel
A
ReadableByteChannel filter which delegates to the wrapped ReadableByteChannel.
A FilterReadableByteChannel wraps some other channel, which it uses as its basic source of data, possibly transforming the data along the way or
providing additional functionality. The class FilterReadableByteChannel itself simply overrides methods of ReadableByteChannel with versions
that pass all requests to the wrapped channel. Subclasses of FilterReadableByteChannel may of course override any methods declared or inherited by
FilterReadableByteChannel, and may also provide additional fields and methods.
You construct s simple instance with the channel constructor and more
advanced instances through the FilterReadableByteChannel.Builder.
- Since:
- 2.22.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classFilterReadableByteChannel.AbstractBuilder<F extends FilterReadableByteChannel<C>,C extends ReadableByteChannel, B extends FilterReadableByteChannel.AbstractBuilder<F, C, B>> Builds instances ofFilterReadableByteChannelfor subclasses.static classBuilds instances ofFilterByteChannel. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a newFilterReadableByteChannel.Builder.intread(ByteBuffer dst) Methods inherited from class org.apache.commons.io.channels.FilterChannel
close, forChannel, isOpen, unwrap
-
Constructor Details
-
FilterReadableByteChannel
Constructs a new instance.- Parameters:
channel- The channel to wrap.
-
-
Method Details
-
forReadableByteChannel
Creates a newFilterReadableByteChannel.Builder.- Returns:
- a new
FilterReadableByteChannel.Builder.
-
read
- Specified by:
readin interfaceReadableByteChannel- Throws:
IOException
-