Jul
28
28
I’ve had an interesting problem with FileOutputChannel and RandomAccessFile from Java NIO.
If I understand the API correctly, it is enough to position(pos) on a FileOutputChannel and then use transferFrom
However transferFrom always returned 0. Then I used setLength on the RandomAccessFile where the FileOutputChannel was derived from and then it worked.
This was for Java 1.6 developer preview on OS X 10.4, maybe it is not even a Problem on other systems.
Are you interested in reading more from CodingClues?
Then subscribe to new postings
via RSS or
via
E-Mail.
Add New Comment
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Add New Comment
Trackbacks
(Trackback URL)