org.gudy.azureus2.core3.torrent.impl
Class TOTorrentCreatorImpl

java.lang.Object
  extended by org.gudy.azureus2.core3.torrent.impl.TOTorrentCreatorImpl
All Implemented Interfaces:
TOTorrentCreator

public class TOTorrentCreatorImpl
extends Object
implements TOTorrentCreator


Constructor Summary
TOTorrentCreatorImpl(File _torrent_base)
           
TOTorrentCreatorImpl(File _torrent_base, URL _announce_url, boolean _add_other_hashes, long _piece_length)
           
TOTorrentCreatorImpl(File _torrent_base, URL _announce_url, boolean _add_other_hashes, long _piece_min_size, long _piece_max_size, long _piece_num_lower, long _piece_num_upper)
           
 
Method Summary
 void addListener(TOTorrentProgressListener listener)
           
 void cancel()
           
 TOTorrent create()
           
 long getTorrentDataSizeFromFileOrDir()
           
 void removeListener(TOTorrentProgressListener listener)
           
 void setFileIsLayoutDescriptor(boolean b)
          A 'layout descriptor' is a file that explicitly details the construction of the torrent from a collection of files, rather than relying on a natural file system structure.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TOTorrentCreatorImpl

public TOTorrentCreatorImpl(File _torrent_base)

TOTorrentCreatorImpl

public TOTorrentCreatorImpl(File _torrent_base,
                            URL _announce_url,
                            boolean _add_other_hashes,
                            long _piece_length)
                     throws TOTorrentException
Throws:
TOTorrentException

TOTorrentCreatorImpl

public TOTorrentCreatorImpl(File _torrent_base,
                            URL _announce_url,
                            boolean _add_other_hashes,
                            long _piece_min_size,
                            long _piece_max_size,
                            long _piece_num_lower,
                            long _piece_num_upper)
                     throws TOTorrentException
Throws:
TOTorrentException
Method Detail

setFileIsLayoutDescriptor

public void setFileIsLayoutDescriptor(boolean b)
Description copied from interface: TOTorrentCreator
A 'layout descriptor' is a file that explicitly details the construction of the torrent from a collection of files, rather than relying on a natural file system structure. The file is bencoded and consists of a Map with a List called 'file_map'. The sub-maps have two entries: , is a list of Strings that correspond to a virtual folder structure and the logical file name is the absolute path of the physical file or dir

Specified by:
setFileIsLayoutDescriptor in interface TOTorrentCreator

create

public TOTorrent create()
                 throws TOTorrentException
Specified by:
create in interface TOTorrentCreator
Throws:
TOTorrentException

getTorrentDataSizeFromFileOrDir

public long getTorrentDataSizeFromFileOrDir()
                                     throws TOTorrentException
Specified by:
getTorrentDataSizeFromFileOrDir in interface TOTorrentCreator
Throws:
TOTorrentException

cancel

public void cancel()
Specified by:
cancel in interface TOTorrentCreator

addListener

public void addListener(TOTorrentProgressListener listener)
Specified by:
addListener in interface TOTorrentCreator

removeListener

public void removeListener(TOTorrentProgressListener listener)
Specified by:
removeListener in interface TOTorrentCreator