Skip to content

Instantly share code, notes, and snippets.

@ashkrit
Created March 14, 2014 17:08
Show Gist options
  • Save ashkrit/9552133 to your computer and use it in GitHub Desktop.
Save ashkrit/9552133 to your computer and use it in GitHub Desktop.
FileChannel fc = new RandomAccessFile(fileName, "rw").getChannel();
// Map 8 bytes for long value.
mem = fc.map(FileChannel.MapMode.READ_WRITE, 0, 8);
startAddress = ((DirectBuffer) mem).address();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment