The class RequestDictionary is used to encapsulate the various collections exposed by the Request object. Since they represent information sent from the client to the server, they are read-only.
public class RequestDictionary extends java.util.Dictionary
implements aspcomp.Enumerator,
aspcomp.Map
{
public int getCount();
// java.util.Dictionary Methods
public Object get(Object key) throws AspComponentException;
public Object put(Object key, Object value) throws AspComponentException;
public int size();
public Boolean isEmpty();
public Enumeration keys();
public Enumeration elements();
public Object remove(Object key) throws AspComponentException;
// Map Methods
public int getType(String name);
public Boolean getBoolean(String name) throws ClassCastException;
public byte getByte(String name) throws ClassCastException;
public short getShort(String name) throws ClassCastException;
public char getChar(String name) throws ClassCastException;
public int getInt(String name) throws ClassCastException;
public long getLong(String name) throws ClassCastException;
public float getFloat(String name) throws ClassCastException;
public double getDouble(String name) throws ClassCastException;
public String getString(String name) throws ClassCastException;
public Date getDate(String name) throws ClassCastException;
public Object getObject(String name) throws ClassCastException;
public Variant getVariant(String name) throws ClassCastException;
public void setObject(String name, Object o) throws AspComponentException;
public void setBoolean(String name, Boolean b) throws AspComponentException;
public void setByte(String name, byte b) throws AspComponentException;
public void setShort(String name, short v) throws AspComponentException;
public void setInt(String name, int v) throws AspComponentException;
public void setFloat(String name, float v) throws AspComponentException;
public void setDouble(String name, double v) throws AspComponentException;
public void setString(String name, String v) throws AspComponentException;
public void setDate(String name, Date v) throws AspComponentException;
public void setVariant(String name, Variant var) throws AspComponentException;
// Enumeration methods
public Boolean hasMoreElements();
public Object nextElement() throws NoSuchElementException;
public void reset();
public Object clone();
}
RequestDictionary Members
Returns the number of items in the collection.
java.util.Dictionary Methods
public Object get(Object key);
Returns the Object for the specified key. If no Object exists for the specified key, null will be returned.
Note that key must be of type String.
public Object put(Object key, Object value);
Since RequestDictionary objects are read-only, this method is not valid, and will throw an AspComponentException if called.
Returns the number of entries in the dictionary.
Returns true only if the dictionary contains no entries.
Returns an Enumeration that will enumerate through all of the keys contained in the dictionary.
public Enumeration elements( );
Returns an Enumeration that will enumerate through all of the entries contained in the dictionary.
public Object remove(Object key);
Since RequestDictionary objects are read-only, this method is not valid, and will throw an AspComponentException if called.
Map Methods
int getType(String name)
Returns the variant type of the object identified by name.
Note: This method does not actually retrieve the object from the Map, but rather the value of the type field of the variant that holds the object.
Object getObject(String name) throws ClassCastException
Boolean getBoolean(String name) throws ClassCastException
byte getByte(String name) throws ClassCastException
short getShort(String name) throws ClassCastException
char getChar(String name) throws ClassCastException
int getInt(String name) throws ClassCastException
long getLong(String name) throws ClassCastException
float getFloat(String name) throws ClassCastException
double getDouble(String name) throws ClassCastException
String getString(String name) throws ClassCastException
java.util.Date getDate(String name) throws ClassCastException
Variant getVariant(String name) throws ClassCastException
Returns the object associated with name as the requested type. Since all ASP collections store objects as variants, they can hold objects of various types. The various get members allow you to retrieve the objects in the collection, converting them to the appropriate Java types. For built-in types, you should use methods like getDouble, or getInt. For the OLE Date type, use the getDate, which will convert it to a java.util.Date.
The getVariant method can be used to retrieve the object as the actual variant stored in the collection.
Note: You can only retrieve an object whose variant type matches the type that you attempting to retrieve it as. For example, if the actual variant is type int, you can not retrieve it using the getFloat method. If you attempt to obtain a given object using a method that does not match the actual type, a ClassCastException will be thrown.
void setObject(String name, Object o)
throws AspComponentException
void setBoolean(String name, Boolean b) throws
AspComponentException
void setByte(String name, byte b) throws AspComponentException
void setShort(String name, short s) throws AspComponentException
void setInt(String name, int i) throws AspComponentException
void setFloat(String name, float f) throws AspComponentException
void setDouble(String name, double d) throws AspComponentException
void setString(String name, String str) throws
AspComponentException
void setDate(String name, Date d) throws AspComponentException
void setVariant(String name, Variant var) throws
AspComponentException
Since RequestDictionary objects are read-only, this method is not valid, and will throw an AspComponentException if called.
Enumerator Methods
Resets the Enumerator to the start of the collection.
public Boolean hasMoreElements( )
Returns true if there are any more items in the collection that can be obtained by calling nextElement( ).
public Object nextElement( ) throws NoSuchElementException
Returns the next Object in the collection. You should typically call this following a call to hasMoreElements( ).
java.lang.Cloneable Methods
Makes a copy of the Enumerator, with the current state of the Enumeration.