6963828: TEST_BUG: java/nio/channels/FileTransfer.java takes too long (win)
Alan Bateman
Alan.Bateman at oracle.com
Thu Jun 24 06:31:30 PDT 2010
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20100624/d0af7bfa/attachment.html
More information about the nio-dev
mailing list