public synchronized NikeFS2RandomAccessStorage copy() throws IOException {
		// NOTE: This method's implementation assumes that all blocks served
		// from the virtual file system are of equal block size!
		// If this condition does not hold, unexpected results will be
		// expected!
		NikeFS2RandomAccessStorageImpl clone = new NikeFS2RandomAccessStorageImpl(vfs);
		if(blocks.size() > 0) {
			// add copies of all contained blocks
			byte[] buffer = new byte[blocks.get(0).size()];
			for(NikeFS2Block block : blocks) {
				NikeFS2Block copyBlock = vfs.allocateBlock();
				block.read(0, buffer);
				copyBlock.write(0, buffer);
				clone.blocks.add(copyBlock);
			}
		}
		// adjust state
		clone.size = size;
		clone.pointer = 0;
		return clone;
	}
public synchronized NikeFS2RandomAccessStorage copy ( ) throws IOException { NikeFS2RandomAccessStorageImpl clone = new NikeFS2RandomAccessStorageImpl ( vfs ) ; if ( blocks . size ( ) > 0 ) { byte [ ] buffer = new byte [ blocks . get ( 0 ) . size ( ) ] ; for ( NikeFS2Block block : blocks ) { NikeFS2Block copyBlock = vfs . allocateBlock ( ) ; block . read ( 0 , buffer ) ; copyBlock . write ( 0 , buffer ) ; clone . blocks . add ( copyBlock ) ; } } clone . size = size ; clone . pointer = 0 ; return clone ; }
/* (non-Javadoc)
@see org.processmining.framework.log.rfb.io.RandomAccessStorage#copy()