APISonar


org.klomp.snark.SnarkManager.util

> org > klomp > snark > SnarkManager > util
org APIs klomp APIs snark APIs SnarkManager APIs util APIs

Example 1
private transient SnarkManager _manager;

    private void addMagnet(String url, File dataDir) {
        try {
            MagnetURI magnet = new MagnetURI(_manager.util(), url);
            String name = magnet.getName();
            byte[] ih = magnet.getInfoHash();
            String trackerURL = magnet.getTrackerURL();
            _manager.addMagnet(name, ih, trackerURL, true, dataDir);
        } catch (IllegalArgumentException iae) {
            _manager.addMessage(_("Invalid magnet URL {0}", url));
        }
    }