public void truncate(final long position){
  final int index=index(position);
  final int offset=offset(position);
  final Block block=blocks.get(index);
  this.index=index;
  block.limit=offset;
  current=block;
}

public void truncate ( final long position ) { final int index = index ( position ) ; final int offset = offset ( position ) ; final Block block = blocks . get ( index ) ; this . index = index ; block . limit = offset ; current = block ; }
resets the write buffer to a particular point .
