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 int
private final TOTorrent
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
buildFileLookupTable
(TOTorrentFile torrent_file, LocaleUtilDecoder locale_decoder, char separator) Builds the path stored in fileDictionay, saving it in btFileListprivate void
buildFileLookupTables
(TOTorrentFile[] torrent_files, LocaleUtilDecoder locale_decoder) private void
buildFileLookupTables
(TOTorrentFile torrent_file, String fileName) private List<PieceMapEntryImpl>
buildLastPieceToFileList
(List<PieceMapperImpl.fileInfo> file_list, int current_file, long file_offset) void
construct
(LocaleUtilDecoder _locale_decoder, String _save_name) getFiles()
int
int
long
-
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:
construct
in 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:
fileDictionay
-btFileList
-localeUtil
-separator
-- Throws:
UnsupportedEncodingException
-
getPieceMap
- Specified by:
getPieceMap
in interfaceDMPieceMapper
-
buildLastPieceToFileList
private List<PieceMapEntryImpl> buildLastPieceToFileList(List<PieceMapperImpl.fileInfo> file_list, int current_file, long file_offset) -
getTotalLength
public long getTotalLength()- Specified by:
getTotalLength
in interfaceDMPieceMapper
-
getPieceLength
public int getPieceLength()- Specified by:
getPieceLength
in interfaceDMPieceMapper
-
getLastPieceLength
public int getLastPieceLength()- Specified by:
getLastPieceLength
in interfaceDMPieceMapper
-
getFiles
- Specified by:
getFiles
in interfaceDMPieceMapper
-