Methods Summary |
---|
public void | addTorrentAnnounceURLSet(java.net.URL[] urls)
|
public byte[] | getAdditionalByteArrayProperty(java.lang.String name)
return( (byte[])additional_properties.get(name));
|
public java.util.List | getAdditionalListProperty(java.lang.String name)
return((List)additional_properties.get(name));
|
public java.lang.Long | getAdditionalLongProperty(java.lang.String name)
return((Long)additional_properties.get(name));
|
public java.util.Map | getAdditionalMapProperty(java.lang.String name)
return( (Map)additional_properties.get(name));
|
public java.lang.Object | getAdditionalProperty(java.lang.String name)
return( additional_properties.get(name));
|
public java.lang.String | getAdditionalStringProperty(java.lang.String name)
try{
Object obj = additional_properties.get(name);
if ( obj == null ){
return( null );
}
if ( !( obj instanceof byte[] )){
Debug.out( "property '" + name + "' is not a byte[]: " + obj );
return( null );
}
return( new String((byte[])obj,Constants.DEFAULT_ENCODING));
}catch( Throwable e ){
Debug.printStackTrace( e );
return( null );
}
|
public java.net.URL | getAnnounceURL()
return( announce_url );
|
public TOTorrentAnnounceURLGroup | getAnnounceURLGroup()
return(
new TOTorrentAnnounceURLGroup()
{
public TOTorrentAnnounceURLSet[]
getAnnounceURLSets()
{
return( new TOTorrentAnnounceURLSet[0] );
}
public void
setAnnounceURLSets(
TOTorrentAnnounceURLSet[] sets )
{
}
public TOTorrentAnnounceURLSet
createAnnounceURLSet(
URL[] urls )
{
return( new TOTorrentAnnounceURLSet()
{
public URL[]
getAnnounceURLs()
{
return( new URL[0]);
}
public void
setAnnounceURLs(
URL[] urls )
{
}
});
}
});
|
public byte[] | getComment()
return( null );
|
public byte[] | getCreatedBy()
return( null );
|
public long | getCreationDate()
return(0);
|
public TOTorrentFile[] | getFiles()
return( new TOTorrentFile[0]);
|
public byte[] | getHash()
return( hash );
|
public HashWrapper | getHashWrapper()
return( hash_wrapper );
|
public AEMonitor | getMonitor()
return( this_mon );
|
public byte[] | getName()
return( name );
|
public int | getNumberOfPieces()
return( 0);
|
public long | getPieceLength()
return( -1 );
|
public byte[][] | getPieces()
return( new byte[0][] );
|
public boolean | getPrivate()
return( false );
|
public long | getSize()
return( -1 );
|
public boolean | hasSameHashAs(TOTorrent other)
try{
byte[] other_hash = other.getHash();
return( Arrays.equals( hash, other_hash ));
}catch( TOTorrentException e ){
Debug.printStackTrace( e );
return( false );
}
|
public boolean | isCreated()
return( false );
|
public boolean | isSimpleTorrent()
return( true );
|
public void | print()
|
public void | removeAdditionalProperties()
additional_properties.clear();
|
public void | removeAdditionalProperty(java.lang.String name)
additional_properties.remove( name );
|
public void | serialiseToBEncodedFile(java.io.File file)
throw( new TOTorrentException("External Torrent", TOTorrentException.RT_WRITE_FAILS ));
|
public java.util.Map | serialiseToMap()
throw( new TOTorrentException("External Torrent", TOTorrentException.RT_WRITE_FAILS ));
|
public void | serialiseToXMLFile(java.io.File file)
throw( new TOTorrentException("External Torrent", TOTorrentException.RT_WRITE_FAILS ));
|
public void | setAdditionalByteArrayProperty(java.lang.String name, byte[] value)
additional_properties.put(name,value);
|
public void | setAdditionalListProperty(java.lang.String name, java.util.List value)
additional_properties.put(name,value);
|
public void | setAdditionalLongProperty(java.lang.String name, java.lang.Long value)
additional_properties.put(name,value);
|
public void | setAdditionalMapProperty(java.lang.String name, java.util.Map value)
additional_properties.put(name,value);
|
public void | setAdditionalProperty(java.lang.String name, java.lang.Object value)
if ( name instanceof String ){
setAdditionalStringProperty(name,(String)value);
}else{
additional_properties.put( name, value );
}
|
public void | setAdditionalStringProperty(java.lang.String name, java.lang.String value)
try{
additional_properties.put(name,value.getBytes(Constants.DEFAULT_ENCODING));
}catch( Throwable e ){
Debug.printStackTrace( e );
}
|
public boolean | setAnnounceURL(java.net.URL url)
return false;
|
public void | setComment(java.lang.String comment)
|
public void | setCreationDate(long date)
|
public void | setPieces(byte[][] b)
|
public void | setPrivate(boolean _private)
|