public class MagnetURI extends Object
| Modifier and Type | Field and Description |
|---|---|
static String | MAGGOTMaggot protocol prefix. |
static String | MAGNETBEP 9 magnet prefix. |
static String | MAGNET_FULLFull magnet URI prefix with info hash parameter. |
static String | MAGNET_FULL_V2https://blog.libtorrent.org/2020/09/bittorrent-v2/ TODO, dup param parsing, as a dual v1/v2
link will contain two xt params |
| Constructor and Description |
|---|
MagnetURI(I2PSnarkUtil util,
String url) |
| Modifier and Type | Method and Description |
|---|---|
byte[] | getInfoHash()Returns the 20-byte info hash of the torrent. |
String | getName()Returns the display name for this magnet link. |
String | getTrackerURL()Returns the first valid I2P tracker URL from the magnet link. |
List<String> | getTrackerURLs()Returns all valid I2P tracker URLs from the magnet link. |
public static final String MAGGOT
public static final String MAGNET
public static final String MAGNET_FULL
public static final String MAGNET_FULL_V2
public MagnetURI(I2PSnarkUtil util, String url) throws IllegalArgumentException
url - non-nullIllegalArgumentExceptionpublic byte[] getInfoHash()
public String getName()
public String getTrackerURL()