Class ChannelOutput
- java.lang.Object
-
- org.apache.commons.crypto.stream.output.ChannelOutput
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,Output
public class ChannelOutput extends java.lang.Object implements Output
The ChannelOutput class takes aWritableByteChannelobject and wraps it asOutputobject acceptable byCryptoOutputStreamas the output target.
-
-
Field Summary
Fields Modifier and Type Field Description private java.nio.channels.WritableByteChannelchannel
-
Constructor Summary
Constructors Constructor Description ChannelOutput(java.nio.channels.WritableByteChannel channel)Constructs aChannelOutput.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Overrides theOutput.close().voidflush()Overrides theOutput.flush().intwrite(java.nio.ByteBuffer src)Overrides theOutput.write(ByteBuffer).
-
-
-
Constructor Detail
-
ChannelOutput
public ChannelOutput(java.nio.channels.WritableByteChannel channel)
Constructs aChannelOutput.- Parameters:
channel- the WritableByteChannel object.
-
-
Method Detail
-
close
public void close() throws java.io.IOExceptionOverrides theOutput.close(). Closes this output and releases any system resources associated with the under layer output.
-
flush
public void flush() throws java.io.IOExceptionOverrides theOutput.flush(). Flushes this output and forces any buffered output bytes to be written out if the under layer output method support.
-
write
public int write(java.nio.ByteBuffer src) throws java.io.IOExceptionOverrides theOutput.write(ByteBuffer). Writes a sequence of bytes to this output from the given buffer.
-
-