if(len+off>getLength()) throw new IOException("Can't read past the file!"); long blockSize = iNode.getExt2FileSystem().getBlockSize(); long bytesRead=0; while( bytesRead < len ) { long blockNr = (fileOffset+bytesRead) / blockSize; long blockOffset = (fileOffset+bytesRead) % blockSize; long copyLength = Math.min(len-bytesRead, blockSize - blockOffset);  System.arraycopy( 	iNode.getDataBlock(blockNr), (int)blockOffset, dest, off+(int)bytesRead, (int)copyLength);  bytesRead += copyLength;
synchronized(iNode) { if(len+off>getLength()) throw new IOException("Can't read past the file!"); long blockSize = iNode.getExt2FileSystem().getBlockSize(); long bytesRead=0; while( bytesRead < len ) { long blockNr = (fileOffset+bytesRead) / blockSize; long blockOffset = (fileOffset+bytesRead) % blockSize; long copyLength = Math.min(len-bytesRead, blockSize - blockOffset);  System.arraycopy( 	iNode.getDataBlock(blockNr), (int)blockOffset, dest, off+(int)bytesRead, (int)copyLength);  bytesRead += copyLength; }
	public void read(long fileOffset, byte[] dest, int off, int len) throws IOException {		if(len+off>getLength())			throw new IOException("Can't read past the file!");		long blockSize = iNode.getExt2FileSystem().getBlockSize();		long bytesRead=0;		while( bytesRead < len ) {			long blockNr = (fileOffset+bytesRead) / blockSize;			long blockOffset = (fileOffset+bytesRead) % blockSize;			long copyLength = Math.min(len-bytesRead, blockSize - blockOffset);						System.arraycopy( 	iNode.getDataBlock(blockNr), (int)blockOffset,								dest, off+(int)bytesRead, (int)copyLength);											bytesRead += copyLength;		}	}