Hi,
I want to read file content into bytebuffer and then decode ByteBuffer bb to CharBuffer. At last i want to close the FileChannel and delete the inputFile. I tried the following program.
The above program works fine. FileChannel.map() method directly maps to the file and get the MappedByteBuffer. But it has a drawback of not releasing the file even though the FileChannel gets closed. It has been reported as a bug in Sun
java bug database.
I came to know that if i use FileChannel.read() method to resolve the problem i got. So i tried the following program.
I wonder it is not decoding the bytebuffer to charbuffer.
Please help me to resolve this problem.
Thank you.