MappedBuffer extends ByteBufferBuffer { public static MappedBuffer allocate(final File file) { return allocate( file, FileChannel.MapMode.READ_WRITE, DEFAULT_INITIAL_CAPACITY, Integer.MAX_VALUE); } protected  MappedBuffer(
      final MappedBytes bytes, final int offset, final int initialCapacity, final int maxCapacity); static MappedBuffer allocate(final File file); static MappedBuffer allocate(final File file, final FileChannel.MapMode mode); static MappedBuffer allocate(final File file, final int capacity); static MappedBuffer allocate(
      final File file, final FileChannel.MapMode mode, final int capacity); static MappedBuffer allocate(
      final File file, final int initialCapacity, final int maxCapacity); static MappedBuffer allocate(
      final File file,
      final FileChannel.MapMode mode,
      final int initialCapacity,
      final int maxCapacity); @Override MappedBuffer duplicate(); void delete();  }
@Test public void testPersist() { final File file = FileTesting.createFile(); try (final MappedBuffer buffer = MappedBuffer.allocate(file, 16)) { buffer.writeLong(10).writeLong(11).flip(); assertEquals(10, buffer.readLong()); assertEquals(11, buffer.readLong()); } try (final MappedBuffer buffer = MappedBuffer.allocate(file, 16)) { assertEquals(10, buffer.readLong()); assertEquals(11, buffer.readLong()); } }