rap
rap

Reputation: 91

Torrent Parser in java

Is there is any torrent parser available in java to extract the meta data from the .torrent files ...

Upvotes: 2

Views: 5227

Answers (3)

repat
repat

Reputation: 350

Have a look at jtorrentparser

It parses an Array of shorts with the static parse() method:

TorrentParser.parse(short[]);

Upvotes: 0

Andreas Dolk
Andreas Dolk

Reputation: 114777

An article on wiki.theory covering the bitorrent spec led to BDecoder, a decoder for the fileformat used by torrent to encode metadata. Have fun! (The page contains a link to a corresponding encoder too)

The easiest approach should be using the Bittorrent API. The provided lib contains a client, which should be capable of decoding metadata and include the java classes for that purpose.


Related questions:

Upvotes: 5

Jeff Mercado
Jeff Mercado

Reputation: 134861

You can use this spec to write up a parser yourself. It shouldn't be too difficult.

Otherwise you could check out the source for any Java-based client. Azureus/Vuze has their source available (don't see any information regarding license at first look).

Upvotes: 0

Related Questions