net.sf.torrentsniffer.bencoding
Class Dictionary

java.lang.Object
  extended bynet.sf.torrentsniffer.bencoding.Dictionary

public class Dictionary
extends java.lang.Object

Implementation of the bencoding Dictionary type.

Author:
Larry Williams

Constructor Summary
Dictionary()
           
 
Method Summary
 void addValue(java.lang.Object value)
          Adds a value to the Dictionary.
 void close()
          Check that all keys have an associated value.
 java.lang.Object get(java.lang.String key)
          Retrieve the value from the dictionary by specifying a key.
 java.lang.String[] getKeys()
          Return the keys in this dictionary.
 java.lang.String getString(java.lang.String key)
          Retrieves a String from the Dictionary
 int size()
          Returns the size of the dictionary.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dictionary

public Dictionary()
Method Detail

addValue

public void addValue(java.lang.Object value)
Adds a value to the Dictionary.

Parameters:
value -
Throws:
java.io.UnsupportedEncodingException

get

public java.lang.Object get(java.lang.String key)
Retrieve the value from the dictionary by specifying a key.

Parameters:
key -
Returns:

getString

public java.lang.String getString(java.lang.String key)
Retrieves a String from the Dictionary

Parameters:
key -
Returns:

close

public void close()
Check that all keys have an associated value.


size

public int size()
Returns the size of the dictionary.

Returns:

getKeys

public java.lang.String[] getKeys()
Return the keys in this dictionary.

Returns:


Copyright © 2004 Larry Williams. All Rights Reserved.