net.sf.torrentsniffer.torrent
Class TorrentInfo

java.lang.Object
  extended bynet.sf.torrentsniffer.torrent.TorrentInfo

public class TorrentInfo
extends java.lang.Object

Represents the Dictionary that describes the file(s) of the torrent. There are two possible forms: one for the case of a 'single-file' torrent with no directory structure, and one for the case of a 'multi-file' torrent, which can contain subdirectory trees.

The isSingleFile returns true if the torrent consists of only one file. The name and length attributes contain the information of the file.

If the torrent consists of multiple files isSingleFile returns false. And the getMultiFile method will return the information of all the files.

Author:
Larry Williams

Constructor Summary
TorrentInfo()
           
 
Method Summary
 int getLength()
           
 java.lang.String getMd5Sum()
           
 TorrentFile[] getMultiFile()
           
 java.lang.String getName()
           
 int getPieceLength()
           
 java.lang.String getPieces()
           
 boolean isSingleFile()
           
 void setLength(int length)
           
 void setMd5Sum(java.lang.String md5Sum)
           
 void setMultiFile(TorrentFile[] multiFile)
           
 void setName(java.lang.String name)
           
 void setPieceLength(int pieceLength)
           
 void setPieces(java.lang.String pieces)
           
 void setSingleFile(boolean isSingleFile)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TorrentInfo

public TorrentInfo()
Method Detail

getMultiFile

public TorrentFile[] getMultiFile()
Returns:
Returns the multiFile.

setMultiFile

public void setMultiFile(TorrentFile[] multiFile)
Parameters:
multiFile - The multiFile to set.

setSingleFile

public void setSingleFile(boolean isSingleFile)
Parameters:
isSingleFile - The isSingleFile to set.

getName

public java.lang.String getName()
Returns:
Returns the name.

setName

public void setName(java.lang.String name)
Parameters:
name - The name to set.

isSingleFile

public boolean isSingleFile()
Returns:
Returns the isSingleFile.

getPieceLength

public int getPieceLength()
Returns:
Returns the pieceLength.

setPieceLength

public void setPieceLength(int pieceLength)
Parameters:
pieceLength - The pieceLength to set.

getPieces

public java.lang.String getPieces()
Returns:
Returns the pieces.

setPieces

public void setPieces(java.lang.String pieces)
Parameters:
pieces - The pieces to set.

getLength

public int getLength()
Returns:
Returns the length.

setLength

public void setLength(int length)
Parameters:
length - The length to set.

getMd5Sum

public java.lang.String getMd5Sum()
Returns:
Returns the md5Sum.

setMd5Sum

public void setMd5Sum(java.lang.String md5Sum)
Parameters:
md5Sum - The md5Sum to set.


Copyright © 2004 Larry Williams. All Rights Reserved.