public class MagnetUri extends Object
Modifier and Type | Class and Description |
---|---|
static class |
MagnetUri.Builder |
Modifier and Type | Method and Description |
---|---|
Optional<String> |
getDisplayName()
Represents the "dn" parameter.
|
Collection<InetPeerAddress> |
getPeerAddresses()
Represents the collection of values of "x.pe" parameters.
|
TorrentId |
getTorrentId()
Represents the "xt" parameter.
|
Collection<String> |
getTrackerUrls()
Represents the collection of values of "tr" parameters.
|
static MagnetUri.Builder |
torrentId(TorrentId torrentId)
Start building a magnet link for a given torrent.
|
public static MagnetUri.Builder torrentId(TorrentId torrentId)
public TorrentId getTorrentId()
public Optional<String> getDisplayName()
public Collection<String> getTrackerUrls()
tr=http%3A%2F%2Fmytracker.com%3A6363&tr=udp%3A%2F%2Fothertrack.org%3A7777
=> ["http://mytracker.com:6363", "udp://othertrack.org:7777"]public Collection<InetPeerAddress> getPeerAddresses()
x.pe=124.131.72.242%3A6891&x.pe=11.9.132.61%3A6900
=> [124.131.72.242:6891, 11.9.132.61:6900]Copyright © 2016–2021. All rights reserved.