com.swfit.core.util
Class HashParams

java.lang.Object
  |
  +--java.util.Dictionary
        |
        +--java.util.Hashtable
              |
              +--com.swfit.core.util.HashParams
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable, javax.servlet.ServletConfig

public final class HashParams
extends java.util.Hashtable
implements javax.servlet.ServletConfig

A HashParams is a utility for reading URLencoded parameters from a file. For convenience it fakes an implementation of the ServletConfig.

Since:
SWFIT1.0
Version:
$Revision: 1.4 $ $Date: 2003/04/20 13:14:00 $
Author:
Olaf Havnes
See Also:
Serialized Form

Inner classes inherited from class java.util.Map
java.util.Map.Entry
 
Field Summary
static java.lang.String COMMENT
          Load / reload the URLencoded parameters
static java.lang.String EQUALS
          Load / reload the URLencoded parameters
 
Method Summary
 boolean dataExists()
           
static HashParams getHashParams(java.io.File file)
           
 java.lang.String getInitParameter(java.lang.String name)
          For passing a HashParam off as a ServletConfig.
 java.util.Enumeration getInitParameterNames()
           
 javax.servlet.ServletContext getServletContext()
          Implement these values for convenience.
 java.lang.String getServletName()
           
 void toFile()
          Sorts the entries alphabetical and saves the parameters in a file.
 java.lang.String value(java.lang.String name)
           
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

COMMENT

public static final java.lang.String COMMENT
Load / reload the URLencoded parameters

EQUALS

public static final java.lang.String EQUALS
Load / reload the URLencoded parameters
Method Detail

getHashParams

public static final HashParams getHashParams(java.io.File file)

dataExists

public final boolean dataExists()

value

public final java.lang.String value(java.lang.String name)

getInitParameter

public final java.lang.String getInitParameter(java.lang.String name)
For passing a HashParam off as a ServletConfig.
Specified by:
getInitParameter in interface javax.servlet.ServletConfig

getInitParameterNames

public final java.util.Enumeration getInitParameterNames()
Specified by:
getInitParameterNames in interface javax.servlet.ServletConfig

getServletContext

public final javax.servlet.ServletContext getServletContext()
Implement these values for convenience.
Specified by:
getServletContext in interface javax.servlet.ServletConfig

getServletName

public final java.lang.String getServletName()
Specified by:
getServletName in interface javax.servlet.ServletConfig

toFile

public final void toFile()
                  throws java.io.IOException
Sorts the entries alphabetical and saves the parameters in a file.


Swfit developer homepage
Copyright © 2003 Orgdot AS. All Rights Reserved.