public String read(long id) { ByteBuffer bb = file.read(id) ; String x = Bytes.fromByteBuffer(bb) ; x = decompress(x) ; return x ; }
@Override public void reposition(long id) { info("reposition("+id+")") ; other.reposition(id) ; }
@Override public long position() { return other.position() ; }
@Override public void abortWrite(Block buffer) { info("abortWrite("+buffer.getId()+")") ; other.abortWrite(buffer) ; }
@Override public String getLabel() { return other.getLabel() ; }
@Override public boolean isEmpty() { return other.isEmpty() ; }
private void test(long id, String x) { String y = f.read(id) ; assertEquals(x, y) ; } }
@Override public void truncate(long size) { // System.out.println("truncate: "+size+" ("+filesize+","+writeBuffer.position()+")") // ; reposition(size) ; }
@Override public long length() { return position() ; }
@Override protected void removeStringFile(StringFile f) { f.close() ; } }