|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttecgraf.ftc_1_2.utils.IOUtils
public class IOUtils
Classe de métodos utilitários para operações de I/O.
| Constructor Summary | |
|---|---|
IOUtils()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IOUtils()
| Method Detail |
|---|
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.
IOException
public 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.
IOException
public 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.
IOException
public static long transferFromNonBlock(FileChannel dstChannel,
long position,
long count,
ReadableByteChannel srcChannel,
ByteBuffer buffer)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||