Package com.biglybt.core.torrent.impl
Class TOTorrentCreateV2Impl
java.lang.Object
com.biglybt.core.torrent.impl.TOTorrentCreateV2Impl
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interface
private class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TOTorrentCreateV2Impl.Adapter
private static final int
private static final int
private long
private int
private int
private final boolean
private ByteArrayHashMap<byte[]>
private final long
private final File
private int
private long
private long
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
TOTorrentCreateV2Impl
(File _root, long _piece_size, TOTorrentCreateV2Impl.Adapter _adapter) -
Method Summary
Modifier and TypeMethodDescriptioncreate()
int
long
long
static byte[]
getV2RootHash
(File file) handleFile
(File file, String relative_path) protected static void
lashUpV1Info
(TOTorrentImpl torrent) private static void
lashUpV2Files
(TOTorrentImpl torrent, List<TOTorrentFileImpl> files, LinkedList<byte[]> path, Map<String, Object> node, long piece_length, long[] torrent_offset, long[] pad_details) static void
void
void
protected static void
setV2FileHashes
(TOTorrentImpl torrent)
-
Field Details
-
block_size
private static final int block_size- See Also:
-
digest_length
private static final int digest_length- See Also:
-
root
-
piece_size
private final long piece_size -
adapter
-
piece_layers
-
total_file_size
private long total_file_size -
total_v1_padding_size
private long total_v1_padding_size -
file_bytes_hashed
private long file_bytes_hashed -
file_index
private int file_index -
synthetic_pad_file_count
private int synthetic_pad_file_count -
files_ignored
private int files_ignored -
flatten_files
private final boolean flatten_files- See Also:
-
-
Constructor Details
-
TOTorrentCreateV2Impl
protected TOTorrentCreateV2Impl(File _root, long _piece_size, TOTorrentCreateV2Impl.Adapter _adapter)
-
-
Method Details
-
getV2RootHash
- Throws:
TOTorrentException
-
create
- Throws:
TOTorrentException
-
getTotalFileSize
public long getTotalFileSize() -
getTotalPadding
public long getTotalPadding() -
getIgnoredFiles
public int getIgnoredFiles() -
processFile
public void processFile(File file, Map<String, Map> node, String relative_path) throws TOTorrentException- Throws:
TOTorrentException
-
processDirectory
public void processDirectory(File dir, Map<String, Map> node, String relative_path) throws TOTorrentException- Throws:
TOTorrentException
-
handleFile
public TOTorrentCreateV2Impl.FileDetails handleFile(File file, String relative_path) throws TOTorrentException - Throws:
TOTorrentException
-
setV2FileHashes
-
lashUpV1Info
- Throws:
TOTorrentException
-
lashUpV2Files
private static void lashUpV2Files(TOTorrentImpl torrent, List<TOTorrentFileImpl> files, LinkedList<byte[]> path, Map<String, Object> node, long piece_length, long[] torrent_offset, long[] pad_details) throws TOTorrentException- Throws:
TOTorrentException
-
main
-