Java nio: How to read characters from memory mapped file with correct charset
问题 for a new project, I have to read the characters of a file (with configurable encoding) to handle the input. As some of these files can be quite large (> 100MB), I wanted to check out the Java nio's ability to memory map files for faster access. However, I was not able to figure out, how I am able to create something "Reader"-like to read from the MappedByteBuffer with the correct charset decoding. To create the MappedByteBuffer, I currently use: RandomAccessFile raFile = new RandomAccessFile