public class ByteChannels extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
ByteChannels()
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
static long |
copy(File input,
File output,
ByteBuffer buffer,
long length)
Copies bytes from
input to output using specified
buffer. |
static long |
copy(File input,
WritableByteChannel output,
ByteBuffer buffer,
long length)
Copies bytes from
input to output using specified
buffer. |
static long |
copy(ReadableByteChannel input,
File output,
ByteBuffer buffer,
long length)
Copies bytes from
input to output using specified
buffer. |
static long |
copy(ReadableByteChannel input,
WritableByteChannel output,
ByteBuffer buffer,
long length)
Copies bytes from
input to output using specified
buffer. |
public static long copy(ReadableByteChannel input, WritableByteChannel output, ByteBuffer buffer, long length) throws IOException
input to output using specified
buffer.input - the inputoutput - the outputbuffer - the bufferlength - the maximum number of bytes to copy; any negative value for
all available bytes.IOException - if an I/O error occurs.public static long copy(File input, WritableByteChannel output, ByteBuffer buffer, long length) throws IOException
input to output using specified
buffer.input - the inputoutput - the outputbuffer - the bufferlength - the maximum number of bytes to copy; any negative value for
all available bytes.IOException - if an I/O error occurs.public static long copy(ReadableByteChannel input, File output, ByteBuffer buffer, long length) throws IOException
input to output using specified
buffer.input - the inputoutput - the outputbuffer - the bufferlength - the maximum number of bytes to copy; any negative value for
all available bytes.IOException - if an I/O error occurs.public static long copy(File input, File output, ByteBuffer buffer, long length) throws IOException
input to output using specified
buffer.input - the inputoutput - the outputbuffer - the bufferlength - the maximum number of bytes to copy; any negative value for
all available bytes.IOException - if an I/O error occurs.Copyright © 2011-2013. All Rights Reserved.