6963828: TEST_BUG: java/nio/channels/FileTransfer.java takes too long (win)
Rémi Forax
forax at univ-mlv.fr
Thu Jun 24 07:47:57 PDT 2010
Le 24/06/2010 15:31, Alan Bateman a écrit :
> Rémi Forax wrote:
>> :
>> It seems there is no way to directly create a FileChannel from a Path.
>> You have to convert the path to a string, create a
>> FileInputStream/FileOutputStream
>> or a RandomAccessFile and called getChannel on it.
> Ah, you might have missed FileChannel.open.
>
> Another way is to cast the return from Path's newByteChannel to a
> FileChannel. That is only guaranteed to work with the default provider
> of course.
>
> -Alan.
>
Ok, thank you.
Rémi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20100624/06edd844/attachment.html
More information about the nio-dev
mailing list