• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

creating a torrent file in java

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.
Can anyone tell me how to create a torrent file in java .
I do not want to use the existing api's like those provided by azuerus.
I just need to develop it from the scratch.
Please help as i need to develop the whole torrent client but first of all i need to learn the basics i.e creating a torrent file.
 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did a quick google, and found the specification....

http://wiki.theory.org/BitTorrentSpecification

The format is describe under meta file structure (section 7).

It actually looks interesting. Might worth a quick read. One of my previous companies worked on a peer to peer mechanism the used the Chord protocol, and I always wondered if the torrent DHT were similar.

Henry
 
krish arya
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is a section in the specification a\c to which the sha1 hash value of the piece needs to be in raw binary encoded form.
I m confused coz the sha1 hash are itself in the form of characters so how to do the raw binary encoding....
Please help....
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

krish arya wrote:I m confused coz


Please UseRealWords: "I am confused because".
 
Henry Wong
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

krish arya wrote:There is a section in the specification a\c to which the sha1 hash value of the piece needs to be in raw binary encoded form.
I m confused coz the sha1 hash are itself in the form of characters so how to do the raw binary encoding....




Actually, sha1 encoding yields binary data... it is just that most of the time, the binary data is further encoded, with either uuencoding or base64, so that it can stored in a properties or xml file.

If the torrent file requires sha1 as binary data, that should make it easier for you -- no need to do the extra steps of encoding to text, and decoding from text.

Henry
 
reply
    Bookmark Topic Watch Topic
  • New Topic