I'm using VUze API to create a JAVA program in order to implement a few experiments on Bittorrent. This code works fine when downloading a torrent
String url = "500mega.torrent";
core = AzureusCoreFactory.create();
core.start();
// System.out.println("Attempting to download torrent at : " + url);
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 download/upload bandwidth. The documentation for Vuze is so bad... Any help would be greatly appreciated.
Thanks.