org.openrdf.sesame.sailimpl.nativerdf.datastore
Class TransferUtil

java.lang.Object
  extended byorg.openrdf.sesame.sailimpl.nativerdf.datastore.TransferUtil

public class TransferUtil
extends Object

Utility class for transfering bytes to/from file channels. The utility normally will use the transferTo() and transferFrom() methods that are available in class FileChannel, but will fall back to more conventional means on platforms on which this doesn't work (JDK 1.4.x with Linux kernel 2.6.x) as a result of bug 5056395.

Version:
$Revision: 1.3.4.2 $
Author:
Arjohn Kampman

Constructor Summary
TransferUtil()
           
 
Method Summary
static long transferFrom(ReadableByteChannel sourceChannel, long startPos, long count, FileChannel targetChannel)
           
static long transferTo(FileChannel sourceChannel, long startPos, long count, WritableByteChannel targetChannel)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransferUtil

public TransferUtil()
Method Detail

transferTo

public static long transferTo(FileChannel sourceChannel,
                              long startPos,
                              long count,
                              WritableByteChannel targetChannel)
                       throws IOException
Throws:
IOException

transferFrom

public static long transferFrom(ReadableByteChannel sourceChannel,
                                long startPos,
                                long count,
                                FileChannel targetChannel)
                         throws IOException
Throws:
IOException


Copyright © 2002-2006 Aduna BV, GNU LGPL License applies.