FileDocCategorySizeDatePackage
DMPieceMapSimple.javaAPI DocAzureus 3.0.3.42771Sun Jul 15 17:04:26 BST 2007org.gudy.azureus2.core3.disk.impl.piecemapper.impl

DMPieceMapSimple

public class DMPieceMapSimple extends Object implements org.gudy.azureus2.core3.disk.impl.piecemapper.DMPieceMap

Fields Summary
private final int
piece_length
private final int
piece_count
private final int
last_piece_length
private final org.gudy.azureus2.core3.disk.impl.DiskManagerFileInfoImpl
file
Constructors Summary
protected DMPieceMapSimple(org.gudy.azureus2.core3.torrent.TOTorrent torrent, org.gudy.azureus2.core3.disk.impl.DiskManagerFileInfoImpl _file)

		piece_length	= (int)torrent.getPieceLength();
		
		piece_count		= torrent.getNumberOfPieces();
		
		int lpl = (int)( torrent.getSize() % piece_length );
		
		if ( lpl == 0 ){
			
			lpl = piece_length;
		}
	
		last_piece_length = lpl;
		
		file	= _file;
	
Methods Summary
public org.gudy.azureus2.core3.disk.impl.piecemapper.DMPieceListgetPieceList(int piece_number)

		return( new pieceList( piece_number ));