Methods Summary |
---|
public static TOTorrentCreator | createFromFileOrDirWithComputedPieceLength(java.io.File file, java.net.URL announce_url)
return( createFromFileOrDirWithComputedPieceLength( file, announce_url, false ));
|
public static TOTorrentCreator | createFromFileOrDirWithComputedPieceLength(java.io.File file, java.net.URL announce_url, boolean add_hashes)
return( createFromFileOrDirWithComputedPieceLength(
file,
announce_url,
add_hashes,
TO_DEFAULT_VARIABLE_PIECE_SIZE_MIN,
TO_DEFAULT_VARIABLE_PIECE_SIZE_MAX,
TO_DEFAULT_VARIABLE_PIECE_NUM_LOWER,
TO_DEFAULT_VARIABLE_PIECE_NUM_UPPER ));
|
public static TOTorrentCreator | createFromFileOrDirWithComputedPieceLength(java.io.File file, java.net.URL announce_url, long piece_min_size, long piece_max_size, long piece_num_lower, long piece_num_upper)
return( createFromFileOrDirWithComputedPieceLength(
file, announce_url, false, piece_min_size, piece_max_size,
piece_num_lower, piece_num_upper ));
|
public static TOTorrentCreator | createFromFileOrDirWithComputedPieceLength(java.io.File file, java.net.URL announce_url, boolean add_hashes, long piece_min_size, long piece_max_size, long piece_num_lower, long piece_num_upper)
return( TOTorrentCreateImpl.create(
file, announce_url, add_hashes, piece_min_size, piece_max_size,
piece_num_lower, piece_num_upper ));
|
public static TOTorrentCreator | createFromFileOrDirWithFixedPieceLength(java.io.File file, java.net.URL announce_url)
return( createFromFileOrDirWithFixedPieceLength( file, announce_url, false, TO_DEFAULT_FIXED_PIECE_SIZE ));
|
public static TOTorrentCreator | createFromFileOrDirWithFixedPieceLength(java.io.File file, java.net.URL announce_url, boolean add_hashes)
return( createFromFileOrDirWithFixedPieceLength( file, announce_url, add_hashes, TO_DEFAULT_FIXED_PIECE_SIZE ));
|
public static TOTorrentCreator | createFromFileOrDirWithFixedPieceLength(java.io.File file, java.net.URL announce_url, long piece_length)
return( createFromFileOrDirWithFixedPieceLength( file, announce_url, false, piece_length ));
|
public static TOTorrentCreator | createFromFileOrDirWithFixedPieceLength(java.io.File file, java.net.URL announce_url, boolean add_hashes, long piece_length)
return( TOTorrentCreateImpl.create( file, announce_url, add_hashes, piece_length ));
|
public static TOTorrent | deserialiseFromBEncodedByteArray(byte[] bytes)
return( new TOTorrentDeserialiseImpl( bytes ));
|
public static TOTorrent | deserialiseFromBEncodedFile(java.io.File file)
// deserialisation methods
return( new TOTorrentDeserialiseImpl( file ));
|
public static TOTorrent | deserialiseFromBEncodedInputStream(java.io.InputStream is)WARNING - take care if you use this that the data you're creating the torrent from doesn't contain
unwanted attributes in it (e.g. "torrent filename"). You should almost definitely be using
TorrentUtils.deserialiseFromBEncodedInputStream
return( new TOTorrentDeserialiseImpl( is ));
|
public static TOTorrent | deserialiseFromMap(java.util.Map data)
return( new TOTorrentDeserialiseImpl( data ));
|
public static TOTorrent | deserialiseFromXMLFile(java.io.File file)
return( new TOTorrentXMLDeserialiser().deserialise( file ));
|
public static long | getComputedPieceSize(long data_size)
return( TOTorrentCreateImpl.getComputedPieceSize(
data_size,
TO_DEFAULT_VARIABLE_PIECE_SIZE_MIN,
TO_DEFAULT_VARIABLE_PIECE_SIZE_MAX,
TO_DEFAULT_VARIABLE_PIECE_NUM_LOWER,
TO_DEFAULT_VARIABLE_PIECE_NUM_UPPER ));
|
public static long | getPieceCount(long total_size, long piece_size)
return( TOTorrentCreateImpl.getPieceCount( total_size, piece_size ));
|
public static long | getTorrentDataSizeFromFileOrDir(java.io.File file_or_dir)
return( TOTorrentCreateImpl.getTorrentDataSizeFromFileOrDir( file_or_dir ));
|