07-15-2015, 05:16 AM
Hello,
I'm trying to code a java program using vuze api in order to implement a few experiments. The download works fine using this code :
However, I can't find the method to limit the upload/download speed. The API documentation is not well detailed in Vuze...
Any help would be much appreciated.
I'm trying to code a java program using vuze api in order to implement a few experiments. The download works fine using this code :
Code:
String url = "500mega.torrent";
core = AzureusCoreFactory.create();
core.start();
File downloadedTorrentFile = new File(url);
System.out.println("Completed download of : " + url);
System.out.println("File stored as : "
+ downloadedTorrentFile.getAbsolutePath());
File downloadDirectory = new File("downloads"); // Destination directory
if (downloadDirectory.exists() == false)
downloadDirectory.mkdir();
COConfigurationManager.initialise();
GlobalManager globalManager = core.getGlobalManager();
DownloadManager manager = globalManager.addDownloadManager(
downloadedTorrentFile.getAbsolutePath(),
downloadDirectory.getAbsolutePath());
DownloadManagerListener listener = new DownloadStateListener();
manager.addListener(listener);
TransferSpeedValidator.setGlobalDownloadRateLimitBytesPerSecond(100);
System.out.println(TransferSpeedValidator
.getGlobalDownloadRateLimitBytesPerSecond());
globalManager.startAllDownloads();
However, I can't find the method to limit the upload/download speed. The API documentation is not well detailed in Vuze...
Any help would be much appreciated.