public class IOUtils extends Object
| Constructor and Description |
|---|
IOUtils() |
| Modifier and Type | Method and Description |
|---|---|
static long |
transferFromNonBlock(FileChannel dstChannel,
long position,
long count,
ReadableByteChannel srcChannel,
ByteBuffer buffer) |
static long |
transferTo(FileChannel srcChannel,
long position,
long count,
WritableByteChannel dstChannel)
Sobrecarga do método
transferTo(FileChannel, long, long, WritableByteChannel, ByteBuffer)
que já especifica um buffer default de 1 MB. |
static long |
transferTo(FileChannel srcChannel,
long position,
long count,
WritableByteChannel dstChannel,
ByteBuffer buffer)
Método para transferência de bytes de um
FileChannel para um
WritableByteChannel. |
static long |
transferToNonBlock(FileChannel srcChannel,
long position,
long count,
WritableByteChannel dstChannel,
ByteBuffer buffer)
Método para transferência de bytes de um
FileChannel para um
WritableByteChannel. |
public static long transferTo(FileChannel srcChannel, long position, long count, WritableByteChannel dstChannel) throws IOException
transferTo(FileChannel, long, long, WritableByteChannel, ByteBuffer)
que já especifica um buffer default de 1 MB.srcChannel - FileChannel de origem para o arquivo a ser transmitido.position - posição a partir da qual o arquivo deverá ser transmitido.count - número de bytes a serem transmitidos.dstChannel - WritableByteChannel de destino para a transferência.IOExceptionpublic static long transferTo(FileChannel srcChannel, long position, long count, WritableByteChannel dstChannel, ByteBuffer buffer) throws IOException
Método para transferência de bytes de um FileChannel para um
WritableByteChannel. Este método procura suprir a deficiência do
FileChannel.transferTo(long, long, WritableByteChannel) em lidar
com arquivos acima de 2GB. Vide
"http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6253145" .
Procurou-se seguir a assinatura e comportamento esperado do método original. Para maiores referências, consulte a API da Sun.
srcChannel - FileChannel de origem para o arquivo a ser transmitido.position - posição a partir da qual o arquivo deverá ser transmitido.count - número de bytes a serem transmitidos.dstChannel - WritableByteChannel de destino para a transferência.buffer - buffer a ser usado para a transferência.IOExceptionpublic static long transferToNonBlock(FileChannel srcChannel, long position, long count, WritableByteChannel dstChannel, ByteBuffer buffer) throws IOException
Método para transferência de bytes de um FileChannel para um
WritableByteChannel. Este método procura suprir a deficiência do
FileChannel.transferTo(long, long, WritableByteChannel) em lidar
com arquivos acima de 2GB. Vide
"http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6253145" .
Procurou-se seguir a assinatura e comportamento esperado do método original. Para maiores referências, consulte a API da Sun.
srcChannel - FileChannel de origem para o arquivo a ser transmitido.position - posição a partir da qual o arquivo deverá ser transmitido.count - número de bytes a serem transmitidos.dstChannel - WritableByteChannel de destino para a transferência.buffer - buffer a ser usado para a transferência.IOExceptionpublic static long transferFromNonBlock(FileChannel dstChannel, long position, long count, ReadableByteChannel srcChannel, ByteBuffer buffer) throws IOException
IOExceptionCopyright © 2019 Tecgraf/PUC-Rio. All rights reserved.