879 lines
20 KiB
HTML
879 lines
20 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
|
|
<!--NewPage-->
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE>
|
|
jala.BitTorrent
|
|
</TITLE>
|
|
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
|
</HEAD>
|
|
<SCRIPT>
|
|
function asd()
|
|
{
|
|
parent.document.title="jala.BitTorrent";
|
|
}
|
|
</SCRIPT>
|
|
<BODY BGCOLOR="white" onload="asd();">
|
|
|
|
<!-- ========== START OF NAVBAR ========== -->
|
|
<A NAME="navbar_bottom"><!-- --></A>
|
|
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
|
<TR>
|
|
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
|
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
|
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
|
<TR ALIGN="center" VALIGN="top">
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary-BitTorrent.js.html"><FONT CLASS="NavBarFont1"><B>File</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"--> <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!-- </TD-->
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"--><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
|
</TR>
|
|
</TABLE>
|
|
</TD>
|
|
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
|
<B>Jala 1.3</B>
|
|
</EM>
|
|
</TD
|
|
</TR>
|
|
|
|
<TR>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="jala.AsyncRequest.html"><B>PREV CLASS</B></A><!--
|
|
NEXT CLASS
|
|
-->
|
|
<A HREF="jala.Captcha.html"><B>NEXT CLASS</B></A></FONT></TD>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
|
<A HREF="jala.BitTorrent.html" TARGET="_top"><B>NO FRAMES</B></A>
|
|
|
|
<SCRIPT>
|
|
<!--
|
|
if(window==top) {
|
|
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
|
|
}
|
|
//-->
|
|
</SCRIPT>
|
|
<NOSCRIPT>
|
|
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
|
|
</NOSCRIPT>
|
|
</FONT></TD>
|
|
</TR>
|
|
<TR>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
SUMMARY: <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
<!-- =========== END OF NAVBAR =========== -->
|
|
<HR>
|
|
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<H2>Class jala.BitTorrent</H2>
|
|
<PRE>Object
|
|
|
|
|
+--<b>jala.BitTorrent</b>
|
|
</PRE>
|
|
|
|
|
|
<HR>
|
|
<DL>
|
|
<!-- Class definition -->
|
|
<DT>class
|
|
<B>jala.BitTorrent</B>
|
|
|
|
|
|
</DL>
|
|
|
|
<P>
|
|
<BR/>This class provides methods to create a BitTorrent
|
|
metadata file from any desired file.
|
|
<BR/><I>Defined in <a href='overview-summary-BitTorrent.js.html'>BitTorrent.js</a></I><BR/><BR/>
|
|
</P>
|
|
|
|
<HR>
|
|
|
|
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
|
|
|
<!-- ======== END NESTED CLASS SUMMARY ======== -->
|
|
|
|
|
|
<!-- =========== FIELD SUMMARY =========== -->
|
|
|
|
|
|
|
|
|
|
<!-- =========== END FIELD SUMMARY =========== -->
|
|
|
|
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
|
|
<A NAME="constructor_summary"><!-- --></A>
|
|
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TD COLSPAN=2><FONT SIZE="+2">
|
|
<B>Constructor Summary</B></FONT></TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD>
|
|
<CODE>
|
|
<B>
|
|
<A HREF="jala.BitTorrent.html#jala.BitTorrent()">jala.BitTorrent</A>
|
|
</B>
|
|
(<String> filePath, <String> trackerUrl)
|
|
</CODE>
|
|
<BR>
|
|
|
|
Constructs a new BitTorrent file.
|
|
</TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<!-- ======== END CONSTRUCTOR SUMMARY ======== -->
|
|
|
|
|
|
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
|
|
<A NAME="method_summary"><!-- --></A>
|
|
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TD COLSPAN=2><FONT SIZE="+2">
|
|
<B>Method Summary</B></FONT></TD>
|
|
</TR>
|
|
|
|
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
|
<FONT SIZE="-1">
|
|
<CODE> Object</CODE>
|
|
</FONT>
|
|
</TD>
|
|
<TD>
|
|
<CODE>
|
|
<B>
|
|
<A HREF="#get">get</A></B>(<String> name)
|
|
</CODE>
|
|
<BR>
|
|
|
|
Get a torrent property.
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
|
<FONT SIZE="-1">
|
|
<CODE> Date</CODE>
|
|
</FONT>
|
|
</TD>
|
|
<TD>
|
|
<CODE>
|
|
<B>
|
|
<A HREF="#getCreationDate">getCreationDate</A></B>()
|
|
</CODE>
|
|
<BR>
|
|
|
|
Get the creation date of the torrent.
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
|
<FONT SIZE="-1">
|
|
<CODE> Number</CODE>
|
|
</FONT>
|
|
</TD>
|
|
<TD>
|
|
<CODE>
|
|
<B>
|
|
<A HREF="#getPieceLength">getPieceLength</A></B>()
|
|
</CODE>
|
|
<BR>
|
|
|
|
Get the piece length of the torrent.
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
|
<FONT SIZE="-1">
|
|
<CODE> helma.File</CODE>
|
|
</FONT>
|
|
</TD>
|
|
<TD>
|
|
<CODE>
|
|
<B>
|
|
<A HREF="#getSourceFile">getSourceFile</A></B>()
|
|
</CODE>
|
|
<BR>
|
|
|
|
Returns the underlying source file.
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
|
<FONT SIZE="-1">
|
|
<CODE> helma.File</CODE>
|
|
</FONT>
|
|
</TD>
|
|
<TD>
|
|
<CODE>
|
|
<B>
|
|
<A HREF="#getTorrentFile">getTorrentFile</A></B>()
|
|
</CODE>
|
|
<BR>
|
|
|
|
Returns the underlying torrent file.
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
|
<FONT SIZE="-1">
|
|
<CODE> Array</CODE>
|
|
</FONT>
|
|
</TD>
|
|
<TD>
|
|
<CODE>
|
|
<B>
|
|
<A HREF="#keys">keys</A></B>()
|
|
</CODE>
|
|
<BR>
|
|
|
|
Get all available property names.
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
|
<FONT SIZE="-1">
|
|
<CODE> void</CODE>
|
|
</FONT>
|
|
</TD>
|
|
<TD>
|
|
<CODE>
|
|
<B>
|
|
<A HREF="#save">save</A></B>(<String> filename)
|
|
</CODE>
|
|
<BR>
|
|
|
|
Saves the torrent as file.
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
|
<FONT SIZE="-1">
|
|
<CODE> void</CODE>
|
|
</FONT>
|
|
</TD>
|
|
<TD>
|
|
<CODE>
|
|
<B>
|
|
<A HREF="#set">set</A></B>(<String> name, <Object> value)
|
|
</CODE>
|
|
<BR>
|
|
|
|
Set a torrent property.
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
|
<FONT SIZE="-1">
|
|
<CODE> void</CODE>
|
|
</FONT>
|
|
</TD>
|
|
<TD>
|
|
<CODE>
|
|
<B>
|
|
<A HREF="#setCreationDate">setCreationDate</A></B>(<Date> date)
|
|
</CODE>
|
|
<BR>
|
|
|
|
Set the creation date of the torrent.
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
|
<FONT SIZE="-1">
|
|
<CODE> void</CODE>
|
|
</FONT>
|
|
</TD>
|
|
<TD>
|
|
<CODE>
|
|
<B>
|
|
<A HREF="#setPieceLength">setPieceLength</A></B>(<Number> length)
|
|
</CODE>
|
|
<BR>
|
|
|
|
Set the piece length of the torrent.
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
|
<FONT SIZE="-1">
|
|
<CODE> String</CODE>
|
|
</FONT>
|
|
</TD>
|
|
<TD>
|
|
<CODE>
|
|
<B>
|
|
<A HREF="#toString">toString</A></B>()
|
|
</CODE>
|
|
<BR>
|
|
|
|
Get a string representation of the torrent.
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
|
<FONT SIZE="-1">
|
|
<CODE><static> Object</CODE>
|
|
</FONT>
|
|
</TD>
|
|
<TD>
|
|
<CODE>
|
|
<B>
|
|
<A HREF="#!s!bdecode">bdecode</A></B>(<String> code)
|
|
</CODE>
|
|
<BR>
|
|
|
|
The bdecode method.
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
|
<FONT SIZE="-1">
|
|
<CODE><static> String</CODE>
|
|
</FONT>
|
|
</TD>
|
|
<TD>
|
|
<CODE>
|
|
<B>
|
|
<A HREF="#!s!bencode">bencode</A></B>(<Object> obj)
|
|
</CODE>
|
|
<BR>
|
|
|
|
The bencode method.
|
|
</TD>
|
|
</TR>
|
|
|
|
|
|
</TABLE>
|
|
|
|
|
|
|
|
<P>
|
|
<!-- ========== END METHOD SUMMARY =========== -->
|
|
|
|
|
|
<!-- ============ FIELD DETAIL START =========== -->
|
|
|
|
|
|
<!-- ============ FIELD DETAIL END =========== -->
|
|
|
|
<!-- ========= CONSTRUCTOR DETAIL START ======== -->
|
|
|
|
<A NAME="constructor_detail"><!-- --></A>
|
|
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TD COLSPAN=1>
|
|
<FONT SIZE="+2"><B>Constructor Detail</B></FONT>
|
|
</TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<A NAME="jala.BitTorrent()"><!-- --></A><H3>
|
|
jala.BitTorrent</H3>
|
|
<PRE><B>jala.BitTorrent</B>(<String> filePath, <String> trackerUrl)</PRE>
|
|
|
|
|
|
<UL>
|
|
Constructs a new BitTorrent file.
|
|
</UL>
|
|
|
|
|
|
|
|
<UL>
|
|
<B>Parameters:</B>
|
|
|
|
<UL><CODE>filePath</CODE> - The path to the original file.
|
|
</UL>
|
|
|
|
<UL><CODE>trackerUrl</CODE> - The URL string of the tracker.
|
|
</UL>
|
|
|
|
|
|
</UL>
|
|
|
|
|
|
<!-- Constructor return value(s) -->
|
|
|
|
<UL>
|
|
<B>Returns:</B>
|
|
<UL>
|
|
A new BitTorrent file.
|
|
</UL>
|
|
</UL>
|
|
|
|
<!-- End constructor return value(s) -->
|
|
|
|
<!-- ADDITIONAL ATTRIBUTES -->
|
|
|
|
<HR/>
|
|
<!-- END ADDITIONAL ATTRIBUTES -->
|
|
|
|
<!-- ========= CONSTRUCTOR DETAIL END ======== -->
|
|
|
|
|
|
<!-- ============ METHOD DETAIL START ========== -->
|
|
|
|
<A NAME="method_detail"><!-- --></A>
|
|
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TD COLSPAN=1><FONT SIZE="+2">
|
|
<B>Method Detail</B></FONT>
|
|
</TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<!-- One single method detail entry -->
|
|
|
|
<A NAME="get"><!-- --></A>
|
|
<H3>get</H3>
|
|
<PRE>Object <B>get</B>(<String> name)</PRE>
|
|
|
|
<UL>Get a torrent property.</UL>
|
|
|
|
|
|
<!-- METHOD PARAMETERS START -->
|
|
|
|
<UL>
|
|
<B>Parameters:</B>
|
|
|
|
<UL><CODE>name</CODE> - The name of the property.
|
|
</UL>
|
|
|
|
</UL>
|
|
|
|
<!-- METHOD PARAMETERS END -->
|
|
|
|
|
|
<UL>
|
|
<B>Returns:</B>
|
|
<UL>
|
|
The value of the property.
|
|
</UL>
|
|
</UL>
|
|
|
|
|
|
<!-- ADDITIONAL ATTRIBUTES START -->
|
|
|
|
<!-- ADDITIONAL ATTRIBUTES END -->
|
|
<HR>
|
|
|
|
<A NAME="getCreationDate"><!-- --></A>
|
|
<H3>getCreationDate</H3>
|
|
<PRE>Date <B>getCreationDate</B>()</PRE>
|
|
|
|
<UL>Get the creation date of the torrent.</UL>
|
|
|
|
|
|
<!-- METHOD PARAMETERS START -->
|
|
|
|
<!-- METHOD PARAMETERS END -->
|
|
|
|
|
|
<UL>
|
|
<B>Returns:</B>
|
|
<UL>
|
|
The torrent's creation date.
|
|
</UL>
|
|
</UL>
|
|
|
|
|
|
<!-- ADDITIONAL ATTRIBUTES START -->
|
|
|
|
<!-- ADDITIONAL ATTRIBUTES END -->
|
|
<HR>
|
|
|
|
<A NAME="getPieceLength"><!-- --></A>
|
|
<H3>getPieceLength</H3>
|
|
<PRE>Number <B>getPieceLength</B>()</PRE>
|
|
|
|
<UL>Get the piece length of the torrent.</UL>
|
|
|
|
|
|
<!-- METHOD PARAMETERS START -->
|
|
|
|
<!-- METHOD PARAMETERS END -->
|
|
|
|
|
|
<UL>
|
|
<B>Returns:</B>
|
|
<UL>
|
|
The torrent's piece length.
|
|
</UL>
|
|
</UL>
|
|
|
|
|
|
<!-- ADDITIONAL ATTRIBUTES START -->
|
|
|
|
<!-- ADDITIONAL ATTRIBUTES END -->
|
|
<HR>
|
|
|
|
<A NAME="getSourceFile"><!-- --></A>
|
|
<H3>getSourceFile</H3>
|
|
<PRE>helma.File <B>getSourceFile</B>()</PRE>
|
|
|
|
<UL>Returns the underlying source file.</UL>
|
|
|
|
|
|
<!-- METHOD PARAMETERS START -->
|
|
|
|
<!-- METHOD PARAMETERS END -->
|
|
|
|
|
|
<UL>
|
|
<B>Returns:</B>
|
|
<UL>
|
|
The source file.
|
|
</UL>
|
|
</UL>
|
|
|
|
|
|
<!-- ADDITIONAL ATTRIBUTES START -->
|
|
|
|
<!-- ADDITIONAL ATTRIBUTES END -->
|
|
<HR>
|
|
|
|
<A NAME="getTorrentFile"><!-- --></A>
|
|
<H3>getTorrentFile</H3>
|
|
<PRE>helma.File <B>getTorrentFile</B>()</PRE>
|
|
|
|
<UL>Returns the underlying torrent file.</UL>
|
|
|
|
|
|
<!-- METHOD PARAMETERS START -->
|
|
|
|
<!-- METHOD PARAMETERS END -->
|
|
|
|
|
|
<UL>
|
|
<B>Returns:</B>
|
|
<UL>
|
|
The torrent file.
|
|
</UL>
|
|
</UL>
|
|
|
|
|
|
<!-- ADDITIONAL ATTRIBUTES START -->
|
|
|
|
<!-- ADDITIONAL ATTRIBUTES END -->
|
|
<HR>
|
|
|
|
<A NAME="keys"><!-- --></A>
|
|
<H3>keys</H3>
|
|
<PRE>Array <B>keys</B>()</PRE>
|
|
|
|
<UL>Get all available property names.</UL>
|
|
|
|
|
|
<!-- METHOD PARAMETERS START -->
|
|
|
|
<!-- METHOD PARAMETERS END -->
|
|
|
|
|
|
<UL>
|
|
<B>Returns:</B>
|
|
<UL>
|
|
The list of property names.
|
|
</UL>
|
|
</UL>
|
|
|
|
|
|
<!-- ADDITIONAL ATTRIBUTES START -->
|
|
|
|
<!-- ADDITIONAL ATTRIBUTES END -->
|
|
<HR>
|
|
|
|
<A NAME="save"><!-- --></A>
|
|
<H3>save</H3>
|
|
<PRE>void <B>save</B>(<String> filename)</PRE>
|
|
|
|
<UL>Saves the torrent as file.</UL>
|
|
|
|
|
|
<!-- METHOD PARAMETERS START -->
|
|
|
|
<UL>
|
|
<B>Parameters:</B>
|
|
|
|
<UL><CODE>filename</CODE> - 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".
|
|
</UL>
|
|
|
|
</UL>
|
|
|
|
<!-- METHOD PARAMETERS END -->
|
|
|
|
|
|
|
|
<!-- ADDITIONAL ATTRIBUTES START -->
|
|
|
|
<!-- ADDITIONAL ATTRIBUTES END -->
|
|
<HR>
|
|
|
|
<A NAME="set"><!-- --></A>
|
|
<H3>set</H3>
|
|
<PRE>void <B>set</B>(<String> name, <Object> value)</PRE>
|
|
|
|
<UL>Set a torrent property.</UL>
|
|
|
|
|
|
<!-- METHOD PARAMETERS START -->
|
|
|
|
<UL>
|
|
<B>Parameters:</B>
|
|
|
|
<UL><CODE>name</CODE> - The name of the property.
|
|
</UL>
|
|
|
|
<UL><CODE>value</CODE> - The property's value.
|
|
</UL>
|
|
|
|
</UL>
|
|
|
|
<!-- METHOD PARAMETERS END -->
|
|
|
|
|
|
|
|
<!-- ADDITIONAL ATTRIBUTES START -->
|
|
|
|
<!-- ADDITIONAL ATTRIBUTES END -->
|
|
<HR>
|
|
|
|
<A NAME="setCreationDate"><!-- --></A>
|
|
<H3>setCreationDate</H3>
|
|
<PRE>void <B>setCreationDate</B>(<Date> date)</PRE>
|
|
|
|
<UL>Set the creation date of the torrent.</UL>
|
|
|
|
|
|
<!-- METHOD PARAMETERS START -->
|
|
|
|
<UL>
|
|
<B>Parameters:</B>
|
|
|
|
<UL><CODE>date</CODE> - The desired creation date.
|
|
</UL>
|
|
|
|
</UL>
|
|
|
|
<!-- METHOD PARAMETERS END -->
|
|
|
|
|
|
|
|
<!-- ADDITIONAL ATTRIBUTES START -->
|
|
|
|
<!-- ADDITIONAL ATTRIBUTES END -->
|
|
<HR>
|
|
|
|
<A NAME="setPieceLength"><!-- --></A>
|
|
<H3>setPieceLength</H3>
|
|
<PRE>void <B>setPieceLength</B>(<Number> length)</PRE>
|
|
|
|
<UL>Set the piece length of the torrent.</UL>
|
|
|
|
|
|
<!-- METHOD PARAMETERS START -->
|
|
|
|
<UL>
|
|
<B>Parameters:</B>
|
|
|
|
<UL><CODE>length</CODE> - The desired piece length.
|
|
</UL>
|
|
|
|
</UL>
|
|
|
|
<!-- METHOD PARAMETERS END -->
|
|
|
|
|
|
|
|
<!-- ADDITIONAL ATTRIBUTES START -->
|
|
|
|
<!-- ADDITIONAL ATTRIBUTES END -->
|
|
<HR>
|
|
|
|
<A NAME="toString"><!-- --></A>
|
|
<H3>toString</H3>
|
|
<PRE>String <B>toString</B>()</PRE>
|
|
|
|
<UL>Get a string representation of the torrent.</UL>
|
|
|
|
|
|
<!-- METHOD PARAMETERS START -->
|
|
|
|
<!-- METHOD PARAMETERS END -->
|
|
|
|
|
|
<UL>
|
|
<B>Returns:</B>
|
|
<UL>
|
|
The torrent as string.
|
|
</UL>
|
|
</UL>
|
|
|
|
|
|
<!-- ADDITIONAL ATTRIBUTES START -->
|
|
|
|
<!-- ADDITIONAL ATTRIBUTES END -->
|
|
<HR>
|
|
|
|
<A NAME="!s!bdecode"><!-- --></A>
|
|
<H3>bdecode</H3>
|
|
<PRE><static> Object <B>bdecode</B>(<String> code)</PRE>
|
|
|
|
<UL>The bdecode method. Turns an encoded string into
|
|
a corresponding JavaScript object structure.
|
|
FIXME: Handle with caution...</UL>
|
|
|
|
|
|
<!-- METHOD PARAMETERS START -->
|
|
|
|
<UL>
|
|
<B>Parameters:</B>
|
|
|
|
<UL><CODE>code</CODE> - The encoded string.
|
|
</UL>
|
|
|
|
</UL>
|
|
|
|
<!-- METHOD PARAMETERS END -->
|
|
|
|
|
|
<UL>
|
|
<B>Returns:</B>
|
|
<UL>
|
|
The decoded JavaScript structure.
|
|
</UL>
|
|
</UL>
|
|
|
|
|
|
<!-- ADDITIONAL ATTRIBUTES START -->
|
|
|
|
<!-- ADDITIONAL ATTRIBUTES END -->
|
|
<HR>
|
|
|
|
<A NAME="!s!bencode"><!-- --></A>
|
|
<H3>bencode</H3>
|
|
<PRE><static> String <B>bencode</B>(<Object> obj)</PRE>
|
|
|
|
<UL>The bencode method. Turns an arbitrary JavaScript
|
|
object structure into a corresponding encoded
|
|
string.</UL>
|
|
|
|
|
|
<!-- METHOD PARAMETERS START -->
|
|
|
|
<UL>
|
|
<B>Parameters:</B>
|
|
|
|
<UL><CODE>obj</CODE> - The target JavaScript object.
|
|
</UL>
|
|
|
|
</UL>
|
|
|
|
<!-- METHOD PARAMETERS END -->
|
|
|
|
|
|
<UL>
|
|
<B>Returns:</B>
|
|
<UL>
|
|
The encoded string.
|
|
</UL>
|
|
</UL>
|
|
|
|
|
|
<!-- ADDITIONAL ATTRIBUTES START -->
|
|
|
|
<!-- ADDITIONAL ATTRIBUTES END -->
|
|
<HR>
|
|
|
|
|
|
|
|
<!-- ============ METHOD DETAIL END ========== -->
|
|
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
|
|
<!-- ========== START OF NAVBAR ========== -->
|
|
<A NAME="navbar_bottom"><!-- --></A>
|
|
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
|
<TR>
|
|
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
|
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
|
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
|
<TR ALIGN="center" VALIGN="top">
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary-BitTorrent.js.html"><FONT CLASS="NavBarFont1"><B>File</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><b>Tree</b></FONT></A> </TD>
|
|
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"--> <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!-- </TD-->
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
|
</TR>
|
|
</TABLE>
|
|
</TD>
|
|
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
|
<B>Jala 1.3</B>
|
|
</EM>
|
|
</TD
|
|
</TR>
|
|
|
|
<TR>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="jala.AsyncRequest.html"><B>PREV CLASS</B></A><!--
|
|
NEXT CLASS
|
|
-->
|
|
<A HREF="jala.Captcha.html"><B>NEXT CLASS</B></A></FONT></TD>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
|
<A HREF="jala.BitTorrent.html" TARGET="_top"><B>NO FRAMES</B></A>
|
|
|
|
<SCRIPT>
|
|
<!--
|
|
if(window==top) {
|
|
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
|
|
}
|
|
//-->
|
|
</SCRIPT>
|
|
<NOSCRIPT>
|
|
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
|
|
</NOSCRIPT>
|
|
</FONT></TD>
|
|
</TR>
|
|
<TR>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
SUMMARY: <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<!-- =========== END OF NAVBAR =========== -->
|
|
|
|
<HR>
|
|
<FONT SIZE="-1">
|
|
|
|
</FONT>
|
|
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Tue Jan 8 15:45:31 2008</div>
|
|
</BODY>
|
|
</HTML>
|