net.sf.torrentsniffer.torrent
Class TorrentImpl

java.lang.Object
  extended bynet.sf.torrentsniffer.torrent.TorrentImpl
All Implemented Interfaces:
Torrent

public class TorrentImpl
extends java.lang.Object
implements Torrent

Implementation of the Torrent.

Author:
Larry Williams

Constructor Summary
TorrentImpl(java.lang.String file)
           
TorrentImpl(java.net.URL url)
           
 
Method Summary
 java.lang.String getComment()
          Get the comment.
 java.lang.String getCreatedBy()
          Get the creator.
 java.util.Date getCreationDate()
          Get the creation date.
 TorrentInfo getInfo()
          Get the torrent info.
 byte[] getInfoHash()
          Calculate the hash for the info data.
 Dictionary getRoot()
          Returns the Java version of the bencoded torrent.
 TorrentState getState()
          Retrieve the state of this torrent.
 Tracker getTracker()
          Get the tracker.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TorrentImpl

public TorrentImpl(java.lang.String file)
            throws java.io.FileNotFoundException
Parameters:
file -
Throws:
java.io.FileNotFoundException

TorrentImpl

public TorrentImpl(java.net.URL url)
Parameters:
url -
Method Detail

getTracker

public Tracker getTracker()
Description copied from interface: Torrent
Get the tracker.

Specified by:
getTracker in interface Torrent
Returns:

getComment

public java.lang.String getComment()
Description copied from interface: Torrent
Get the comment.

Specified by:
getComment in interface Torrent
Returns:

getCreationDate

public java.util.Date getCreationDate()
Description copied from interface: Torrent
Get the creation date.

Specified by:
getCreationDate in interface Torrent
Returns:

getCreatedBy

public java.lang.String getCreatedBy()
Description copied from interface: Torrent
Get the creator.

Specified by:
getCreatedBy in interface Torrent
Returns:

getInfo

public TorrentInfo getInfo()
Description copied from interface: Torrent
Get the torrent info.

Specified by:
getInfo in interface Torrent
Returns:

getState

public TorrentState getState()
Description copied from interface: Torrent
Retrieve the state of this torrent.

Specified by:
getState in interface Torrent
Returns:

getInfoHash

public byte[] getInfoHash()
Calculate the hash for the info data.

Returns:

getRoot

public Dictionary getRoot()
Description copied from interface: Torrent
Returns the Java version of the bencoded torrent.

Specified by:
getRoot in interface Torrent
Returns:


Copyright © 2004 Larry Williams. All Rights Reserved.