org.gudy.azureus2.core3.torrent.impl
Class TOTorrentCreateImpl
java.lang.Object
org.gudy.azureus2.core3.logging.LogRelation
org.gudy.azureus2.core3.torrent.impl.TOTorrentImpl
org.gudy.azureus2.core3.torrent.impl.TOTorrentCreateImpl
- All Implemented Interfaces:
- TOTorrentFileHasherListener, TOTorrent
public class TOTorrentCreateImpl
- extends TOTorrentImpl
- implements TOTorrentFileHasherListener
Fields inherited from class org.gudy.azureus2.core3.torrent.impl.TOTorrentImpl |
this_mon, TK_ADDITIONAL_OK_ATTRS, TK_ANNOUNCE, TK_ANNOUNCE_LIST, TK_COMMENT, TK_COMMENT_UTF8, TK_CREATED_BY, TK_CREATION_DATE, TK_FILES, TK_HASH_OVERRIDE, TK_INFO, TK_LENGTH, TK_NAME, TK_NAME_UTF8, TK_PATH, TK_PATH_UTF8, TK_PIECE_LENGTH, TK_PIECES, TK_PRIVATE, TK_WEBSEED_BT, TK_WEBSEED_GR |
Constructor Summary |
protected |
TOTorrentCreateImpl(java.util.Map<java.lang.String,java.io.File> _linkage_map,
java.io.File _torrent_base,
java.net.URL _announce_url,
boolean _add_other_hashes,
long _piece_length)
|
protected |
TOTorrentCreateImpl(java.util.Map<java.lang.String,java.io.File> _linkage_map,
java.io.File _torrent_base,
java.net.URL _announce_url,
boolean _add_other_hashes,
long _piece_min_size,
long _piece_max_size,
long _piece_num_lower,
long _piece_num_upper)
|
Methods inherited from class org.gudy.azureus2.core3.torrent.impl.TOTorrentImpl |
addAdditionalInfoProperty, addAdditionalProperty, addListener, addTorrentAnnounceURLSet, anonymityTransform, fireChanged, getAdditionalByteArrayProperty, getAdditionalInfoProperties, getAdditionalListProperty, getAdditionalLongProperty, getAdditionalMapProperty, getAdditionalProperties, getAdditionalProperty, getAdditionalStringProperty, getAnnounceURL, getAnnounceURLGroup, getComment, getCreatedBy, getCreationDate, getFileCount, getFiles, getHash, getHashOverride, getHashWrapper, getMonitor, getName, getNumberOfPieces, getPieceLength, getPieces, getPrivate, getQueryableInterfaces, getRelationText, getSimpleTorrent, getSize, getUTF8Name, hasSameHashAs, isCreated, isDecentralised, isSimpleTorrent, print, readStringFromMetaData, readStringFromMetaData, removeAdditionalProperties, removeAdditionalProperty, removeListener, serialiseToBEncodedFile, serialiseToByteArray, serialiseToMap, serialiseToXMLFile, setAdditionalByteArrayProperty, setAdditionalListProperty, setAdditionalLongProperty, setAdditionalMapProperty, setAdditionalProperty, setAdditionalStringProperty, setAnnounceURL, setComment, setComment, setCreatedBy, setCreatedBy, setCreationDate, setFiles, setHashFromInfo, setHashOverride, setName, setNameUTF8, setPieceLength, setPieces, setPrivate, setSimpleTorrent, writeStringToMetaData, writeStringToMetaData |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TOTorrentCreateImpl
protected TOTorrentCreateImpl(java.util.Map<java.lang.String,java.io.File> _linkage_map,
java.io.File _torrent_base,
java.net.URL _announce_url,
boolean _add_other_hashes,
long _piece_length)
throws TOTorrentException
- Throws:
TOTorrentException
TOTorrentCreateImpl
protected TOTorrentCreateImpl(java.util.Map<java.lang.String,java.io.File> _linkage_map,
java.io.File _torrent_base,
java.net.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
create
protected void create()
throws TOTorrentException
- Throws:
TOTorrentException
pieceHashed
public void pieceHashed(int piece_number)
- Specified by:
pieceHashed
in interface TOTorrentFileHasherListener
calculateNumberOfPieces
protected long calculateNumberOfPieces(java.io.File _file,
long _piece_length)
throws TOTorrentException
- Throws:
TOTorrentException
calculateTotalFileSize
protected long calculateTotalFileSize(java.io.File file)
throws TOTorrentException
- Throws:
TOTorrentException
getTotalFileSize
protected long getTotalFileSize(java.io.File file)
throws TOTorrentException
- Throws:
TOTorrentException
getTotalFileSizeSupport
protected long getTotalFileSizeSupport(java.io.File file,
java.lang.String root)
throws TOTorrentException
- Throws:
TOTorrentException
report
protected void report(java.lang.String resource_key)
report
protected void report(java.lang.String resource_key,
long bytes)
report
protected void report(java.lang.String resource_key,
java.lang.String additional_text)
getComputedPieceSize
public static long getComputedPieceSize(long total_size,
long _piece_min_size,
long _piece_max_size,
long _piece_num_lower,
long _piece_num_upper)
getPieceCount
public static long getPieceCount(long total_size,
long piece_size)
setIgnoreList
protected void setIgnoreList()
cancel
protected void cancel()
addListener
protected void addListener(TOTorrentProgressListener listener)
removeListener
protected void removeListener(TOTorrentProgressListener listener)