Package com.helger.commons.io.channel
Class ChannelHelper
java.lang.Object
com.helger.commons.io.channel.ChannelHelper
Some very basic NIO channel utility stuff.
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptionstatic longchannelCopy(ReadableByteChannel aSrc, WritableByteChannel aDest) Copy all content from the source channel to the destination channel.static ESuccessstatic ESuccess
-
Method Details
-
channelCopy
@Nonnegative public static long channelCopy(@Nonnull @WillNotClose ReadableByteChannel aSrc, @Nonnull @WillNotClose WritableByteChannel aDest) throws IOException Copy all content from the source channel to the destination channel.- Parameters:
aSrc- Source channel. May not benull. Is not closed after the operation.aDest- Destination channel. May not benull. Is not closed after the operation.- Returns:
- The number of bytes written.
- Throws:
IOException- In case of IO error
-
close
-
release
-