Java BitTorrent Library and Client which aims for ease of programmatic use
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

LightWeight Java Torrent

LWJTorrent (LightWeight Java Torrent) is both a BitTorrent library and a client.

  • As a library, it contains classes to deal with torrent related tasks.
  • As a client, it provides a lightweight, simple and silent implementation of the BitTorrent protocol, which can be used by other applications without any user interaction. This is currently not implemented at all


LWJTorrent includes packages that contains classes that helps with BitTorrent-related tasks. These packages are the core of LWJTorrent, but can be perfectly used outside this project with little effort.


This package is completely stand-alone, something that should not be shocking, as it once was a fully independent project called Darkhogg-Bencode. It is just what it looks, a full Bencode library, with no dependencies outside the JDK, which can be used completely on its own.

Consists entirely of classes that models BitTorrent-related data. The most important class here is the TorrentMetaInfo class, which models a meta info file, or in more common terms, a *.torrent file.


A package that deals with tracker announces. The Tracker class is specifically designed as an abstract class that can only be instantiated by passing a TorrentMetaInfo object. Depending on the object passed, different implementations may be used. TrackerRequests are built by the user and sent to the Tracker, which then responds with a TrackerResponse.


Probably the most important package in the whole library. This package models the BitTorrent protocol used to exchange data between peers. The name of the package is chosen after the name Peer Wire Protocol seen in some places, as the name protocol would have been confusing, as the tracker and meta info files also define protocols. This package seems complicated at first, but is in fact really easy to use.


An implementation of the Distributed Hash Table system used by BitTorrent for trackerless torrents.