Class TOTorrentCreateV2Impl
java.lang.Object
com.biglybt.core.torrent.impl.TOTorrentCreateV2Impl
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interfaceprivate class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TOTorrentCreateV2Impl.Adapterprivate static final intprivate static final intprivate longprivate intprivate intprivate final booleanprivate ByteArrayHashMap<byte[]> private final longprivate final Fileprivate intprivate longprivate long -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTOTorrentCreateV2Impl(File _root, long _piece_size, TOTorrentCreateV2Impl.Adapter _adapter) -
Method Summary
Modifier and TypeMethodDescriptioncreate()intlonglongstatic byte[]getV2RootHash(File file) handleFile(File file, String relative_path) protected static voidlashUpV1Info(TOTorrentImpl torrent) private static voidlashUpV2Files(TOTorrentImpl torrent, List<TOTorrentFileImpl> files, LinkedList<byte[]> path, Map<String, Object> node, long piece_length, long[] torrent_offset, long[] pad_details) static voidvoidvoidprotected static voidsetV2FileHashes(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
-