Class PieceMapperImpl
java.lang.Object
com.biglybt.core.disk.impl.piecemapper.impl.PieceMapperImpl
- All Implemented Interfaces:
DMPieceMapper
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ArrayList<PieceMapperImpl.fileInfo> private final intprivate final TOTorrent -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidbuildFileLookupTable(TOTorrentFile torrent_file, LocaleUtilDecoder locale_decoder, char separator) Builds the path stored in fileDictionay, saving it in btFileListprivate voidbuildFileLookupTables(TOTorrentFile[] torrent_files, LocaleUtilDecoder locale_decoder) private voidbuildFileLookupTables(TOTorrentFile torrent_file, String fileName) private List<PieceMapEntryImpl> buildLastPieceToFileList(List<PieceMapperImpl.fileInfo> file_list, int current_file, long file_offset) voidconstruct(LocaleUtilDecoder _locale_decoder, String _save_name) getFiles()intintlong
-
Field Details
-
torrent
-
last_piece_length
private final int last_piece_length -
btFileList
-
-
Constructor Details
-
PieceMapperImpl
-
-
Method Details
-
construct
public void construct(LocaleUtilDecoder _locale_decoder, String _save_name) throws UnsupportedEncodingException - Specified by:
constructin interfaceDMPieceMapper- Throws:
UnsupportedEncodingException
-
buildFileLookupTables
-
buildFileLookupTables
private void buildFileLookupTables(TOTorrentFile[] torrent_files, LocaleUtilDecoder locale_decoder) throws UnsupportedEncodingException - Throws:
UnsupportedEncodingException
-
buildFileLookupTable
private void buildFileLookupTable(TOTorrentFile torrent_file, LocaleUtilDecoder locale_decoder, char separator) throws UnsupportedEncodingException Builds the path stored in fileDictionay, saving it in btFileList- Parameters:
separator-fileDictionay-btFileList-localeUtil-- Throws:
UnsupportedEncodingException
-
getPieceMap
- Specified by:
getPieceMapin interfaceDMPieceMapper
-
buildLastPieceToFileList
private List<PieceMapEntryImpl> buildLastPieceToFileList(List<PieceMapperImpl.fileInfo> file_list, int current_file, long file_offset) -
getTotalLength
public long getTotalLength()- Specified by:
getTotalLengthin interfaceDMPieceMapper
-
getPieceLength
public int getPieceLength()- Specified by:
getPieceLengthin interfaceDMPieceMapper
-
getLastPieceLength
public int getLastPieceLength()- Specified by:
getLastPieceLengthin interfaceDMPieceMapper
-
getFiles
- Specified by:
getFilesin interfaceDMPieceMapper
-