Packages that use BitField
Package
Description
I2P version of the Snark BitTorrent client, enhanced for I2P: peers are I2P destinations, torrents can be served anonymously as hidden services, and metadata carries I2P-specific comment fields.
Uses of BitField in org.klomp.snark
Subclasses of BitField in org.klomp.snarkModifier and TypeClassDescriptionclassA full bitfield, immutable, to save memory and time.Fields in org.klomp.snark declared as BitFieldModifier and TypeFieldDescriptionprivate BitFieldPartialPiece._paddingMaskBEP 47: per-piece padding sub-block mask, lazily computed; null until first use.private final BitFieldPartialPiece.bitfieldWhich chunks have arrived so far.(package private) BitFieldPeerState.bitfieldThe pieces the peer has.private BitFieldStorage.bitfieldWhich pieces are verified as present.private BitFieldWebPeer.bitfieldThe pieces the seed has.private BitFieldMagnetState.haveWhich metadata pieces have arrived.private BitFieldMagnetState.requestedBitfield for the metainfo chunks; remains null if we start out complete.Methods in org.klomp.snark that return BitFieldModifier and TypeMethodDescriptionStorage.getBitField()The BitField that tells which pieces this storage contains.CompleteListener.getSavedTorrentBitField(Snark snark) Returns the saved bitfield for the torrent.SnarkManager.getSavedTorrentBitField(Snark snark) Saved bitfield for a torrent from the metadata file.UpdateRunner.getSavedTorrentBitField(Snark snark) The saved torrent bit field.Methods in org.klomp.snark with parameters of type BitFieldModifier and TypeMethodDescriptionbooleanSnarkManager.addTorrent(MetaInfo metainfo, BitField bitfield, String filename, File baseFile, boolean dontAutoStart) Add a torrent from a MetaInfo.voidCreates (and/or checks) all files from the metainfo file list.PeerCoordinator.getPartialPiece(Peer peer, BitField havePieces) Return partial piece to the PeerState if it's still wanted and peer has it.PeerCoordinator.getPartialPiece(Peer peer, BitField havePieces, Set<Integer> allowed) Return partial piece to the PeerState if it's still wanted and peer has it.PeerListener.getPartialPiece(Peer peer, BitField havePieces) Called when a peer has connected and there may be a partially downloaded piece that the coordinatorator can give the peer task.PeerListener.getPartialPiece(Peer peer, BitField havePieces, Set<Integer> allowed) Called when a peer has connected and there may be a partially downloaded piece that the coordinator can give the peer task.booleanPeerCoordinator.gotBitField(Peer peer, BitField bitfield) Returns true if the given bitfield contains at least one piece we are interested in.booleanPeerListener.gotBitField(Peer peer, BitField bitfield) Called when a bitmap message is received.private voidSnarkManager.locked_saveTorrentStatus(MetaInfo metainfo, BitField bitfield, int[] priorities, File base, long uploaded, long activity, boolean stopped, Boolean comments) Writes one torrent's progress into its config.booleanCalled when we are downloading from the peer and may need to ask for a new piece.booleanCalled when we are downloading from the peer and may need to ask for a new piece.voidPeer.runConnection(I2PSnarkUtil util, PeerListener listener, BandwidthListener bwl, BitField bitfield, MagnetState mState, boolean uploadOnly) Runs the connection to the other peer.voidWebPeer.runConnection(I2PSnarkUtil util, PeerListener listener, BandwidthListener bwl, BitField ignore, MagnetState mState, boolean uploadOnly) Runs the connection to the other peer.private voidSnarkManager.saveTorrentStatus(MetaInfo metainfo, BitField bitfield, int[] priorities, File base, long uploaded, long activity, boolean stopped, Boolean comments) Save the completion status of a torrent and the current time in the metadata file.(package private) voidPeerState.sendAllowedFast(BitField ourBitfield) Generate and queue the BEP 6 allowed fast set for this peer.(package private) voidPeerConnectionOut.sendBitfield(BitField bitfield) Queue a bitfield, have_all, or have_none message as appropriate.private PieceReturns one of pieces in the given BitField that is still wanted or null if none of the given pieces are wanted.private PieceReturns one of the claimed pieces in the given BitField that is still wanted or null if none of the given pieces are wanted.