Package com.helger.commons.io.channel
Class ChannelHelper
- java.lang.Object
-
- com.helger.commons.io.channel.ChannelHelper
-
@Immutable public final class ChannelHelper extends Object
Some very basic NIO channel utility stuff.- Author:
- Philip Helger
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static longchannelCopy(ReadableByteChannel aSrc, WritableByteChannel aDest)Copy all content from the source channel to the destination channel.static ESuccessclose(Channel aChannel)static ESuccessrelease(FileLock aFileLock)
-
-
-
Method Detail
-
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
-
-