Detailed reference of prototypes, properties and methods available in the
Javascript environment of your Helma web applications.

Fields and methods of the jala.BitTorrent class.
jala BitTorrent(trackerUrl, filePath)
Constructs a new BitTorrent file.
parameters

String | trackerUrl | The URL string of the tracker.
String | filePath | The path to the original file.

methods

- keys()

- get(name)

- set(name, value)

- getCreationDate()

- setCreationDate(date)

- getPieceLength()

- setPieceLength(length)

- getTorrentFile()

- getSourceFile()

- save(filename)

- toString()

Methods
jala.BitTorrent. keys()
Get all available property names.
returns

| The list of property names.

jala.BitTorrent. get(name)
Get a torrent property.
parameters

String | name | The name of the property.

returns

| The value of the property.

jala.BitTorrent. set(name, value)
Set a torrent property.
parameters

String | name | The name of the property.
Object | value | The property's value.

jala.BitTorrent. getCreationDate()
Get the creation date of the torrent.
returns

| The torrent's creation date.

jala.BitTorrent. setCreationDate(date)
Set the creation date of the torrent.
parameters

Date | date | The desired creation date.

jala.BitTorrent. getPieceLength()
Get the piece length of the torrent.
returns

| The torrent's piece length.

jala.BitTorrent. setPieceLength(length)
Set the piece length of the torrent.
parameters

Number | length | The desired piece length.

jala.BitTorrent. getTorrentFile()
Returns the underlying torrent file.
returns

| The torrent file.

jala.BitTorrent. getSourceFile()
Returns the underlying source file.
returns

| The source file.

jala.BitTorrent. save(filename)
Saves the torrent as file.
parameters

String | filename | An optional name for the torrent file. If no name is given it will be composed from name of source file as defined in the torrent plus the ending ".torrent".

jala.BitTorrent. toString()
Get a string representation of the torrent.
returns

| The torrent as string.

jala. BitTorrent.bencode(obj)
The bencode method. Turns an arbitrary JavaScript object structure into a corresponding encoded string.
parameters

Object | obj | The target JavaScript object.

returns

| The encoded string.

jala. BitTorrent.bdecode(code)
The bdecode method. Turns an encoded string into a corresponding JavaScript object structure. FIXME: Handle with caution...
parameters

String | code | The encoded string.

returns

| The decoded JavaScript structure.

Tue, 25 Nov 2008 16:50:20 GMT.

### core framework

- global
- app (application)
- req (request)
- res (response)
- session
- path
- root
- HopObject
- User
- File
- FtpClient
- Image
- Mail
- Remote
- Xml
- DatabaseObject
- MimePart
- Skin
- Object

### optional modules

- Array extensions
- Date extensions
- Number extensions
- Object extensions
- String extensions
- HopObject extensions
- global macros
- macro filters
- JSON methods
- helma.Aspects
- helma.Chart
- helma.Color
- helma.Database
- helma.File
- helma.Ftp
- helma.Group
- helma.Html
- helma.Http
- helma.Image
- helma.Mail
- helma.Search
- helma.Skin
- helma.Ssh
- helma.Url
- helma.Zip
- jala.BitTorrent
- jala.Captcha
- jala.Date
- jala.db
- jala.DnsClient
- jala.Form
- jala.History
- jala HopObject extensions
- jala.HtmlDocument
- jala.I18n
- jala.ImageFilter
- jala.IndexManager
- jala.ListRenderer
- jala.Mp3
- jala.PodcastWriter
- jala.RemoteContent
- jala.Rss20Writer
- jala.Utilities
- jala.XmlRpcRequest
- jala.XmlWriter

### java libraries

- browse docjar