Package com.turn.ttorrent.common

Examples of com.turn.ttorrent.common.Torrent


        }

        String creator = String.format("%s (ttorrent)",
          System.getProperty("user.name"));

        Torrent torrent = null;
        if (source.isDirectory()) {
          File[] files = source.listFiles();
          Arrays.sort(files);
          torrent = Torrent.create(source, Arrays.asList(files),
              announceList, creator);
        } else {
          torrent = Torrent.create(source, announceList, creator);
        }

        torrent.save(fos);
      } else {
        Torrent.load(new File(filenameValue), true);
      }
    } catch (Exception e) {
      logger.error("{}", e.getMessage(), e);
View Full Code Here

TOP

Related Classes of com.turn.ttorrent.common.Torrent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.