M
Marco Braun
Hello there,
I tried to write a readOnly-ByteBuffer to a FileChannel
(FileChannel#write(ByteBuffer)) and all I got
was a ReadOnlyBufferException, thrown in ByteBuffer#array().
How does that make sense? If I write a Buffer to the FileChannel it only
needs to be read, right?
Anyone has an explanation?
Or a workaround? Is there a way to make a readOnly-ByteBuffer
writable again?
I am using Win2k and j2sdk1.4.1_02.
Marco
I tried to write a readOnly-ByteBuffer to a FileChannel
(FileChannel#write(ByteBuffer)) and all I got
was a ReadOnlyBufferException, thrown in ByteBuffer#array().
How does that make sense? If I write a Buffer to the FileChannel it only
needs to be read, right?
Anyone has an explanation?
Or a workaround? Is there a way to make a readOnly-ByteBuffer
writable again?
I am using Win2k and j2sdk1.4.1_02.
Marco