MappedBuffer extends ByteBufferBuffer { public void delete() { ((MappedBytes) bytes).delete(); } 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 testDelete() { final File file = FileTesting.createFile(); final MappedBuffer buffer = MappedBuffer.allocate(file, 16); buffer.writeLong(10).writeLong(11).flip(); assertEquals(10, buffer.readLong()); assertEquals(11, buffer.readLong()); assertTrue(Files.exists(file.toPath())); buffer.delete(); assertFalse(Files.exists(file.toPath())); }