Package org.apache.commons.io.channels
Class FilterWritableByteChannel<C extends WritableByteChannel>
java.lang.Object
org.apache.commons.io.channels.FilterChannel<C>
org.apache.commons.io.channels.FilterWritableByteChannel<C>
- Type Parameters:
C- theWritableByteChanneltype.
- All Implemented Interfaces:
Closeable,AutoCloseable,Channel,WritableByteChannel
public class FilterWritableByteChannel<C extends WritableByteChannel>
extends FilterChannel<C>
implements WritableByteChannel
A
WritableByteChannel filter which delegates to the wrapped WritableByteChannel.
A FilterWritableByteChannel 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 FilterWritableByteChannel itself simply overrides methods of WritableByteChannel with versions
that pass all requests to the wrapped channel. Subclasses of FilterWritableByteChannel may of course override any methods declared or inherited by
WritableByteChannel, and may also provide additional fields and methods.
You construct s simple instance with the Channel constructor and more
advanced instances through the FilterWritableByteChannel.Builder.
- Since:
- 2.22.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classFilterWritableByteChannel.AbstractBuilder<F extends FilterWritableByteChannel<C>,C extends WritableByteChannel, B extends FilterWritableByteChannel.AbstractBuilder<F, C, B>> Builds instances ofFilterWritableByteChannelfor subclasses.static classBuilds instances ofFilterByteChannel. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a newFilterWritableByteChannel.Builder.intwrite(ByteBuffer src) Methods inherited from class org.apache.commons.io.channels.FilterChannel
close, forChannel, isOpen, unwrap
-
Constructor Details
-
FilterWritableByteChannel
Constructs a new instance.- Parameters:
channel- The channel to wrap.
-
-
Method Details
-
forWritableByteChannel
Creates a newFilterWritableByteChannel.Builder.- Returns:
- a new
FilterWritableByteChannel.Builder.
-
write
- Specified by:
writein interfaceWritableByteChannel- Throws:
IOException
-