|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--edu.vt.marian.uip.StringPool
Class name: StringPool Class description: This class is only for the easy operation of formit and webgate, since it's heavily used in the original system, we'd better keep it here otherwise significant modification will be needed to handle html format. But some function/methods are added to reduce coupling between different classes Author: Jianxin Zhao Finished time: June 4, 1998 Known bugs: none Platform: jdk1.1.5 under UNIX
| Constructor Summary | |
StringPool(edu.vt.marian.common.Debug debug)
This constructor just create an empty string pool |
|
StringPool(java.io.InputStream is,
edu.vt.marian.common.Debug debug)
This constructor will create a string pool object from a stream, this is a new method added to this class |
|
StringPool(packet_input_stream pis,
edu.vt.marian.common.Debug debug)
This constructor will create a string pool object from a stream, this is a new method added to this class |
|
| Method Summary | |
void |
AddCGIData(java.lang.String data)
This method will add the cgi data to the string pool, it will first decode special chars like '+', '%', '&' then add the strings seperated by them to the string pool I believe this method reduced the coupling between different classes |
void |
AddString(java.lang.String s)
This method will add the string to the string pool |
void |
AddSubString(java.lang.String s)
This method will add part of the string (strings between data seperaters) into the string pool |
void |
AddValue(java.lang.String name,
java.lang.String value)
This method will add the name value pair to the string pool, this method and the method GetValue will make handling cgi data easy |
void |
DeleteString(int num)
This method will delete the numth string from the string pool. |
java.util.Vector |
get_names()
this method will return the name list in this object |
java.util.Vector |
get_names(java.lang.String value)
this method will return the name list in this object which have the specified value |
int |
GetHexValue(java.lang.String digits)
This method will return the hex value of the parameter digits, -1 will be returned if digits is not a valid hex digit string, by using ...length() insteadof 16 we improve the function's flexibility. |
int |
GetNumLines(int num)
This method will return the number of lines in the numth string of the string pool |
int |
GetNumStrings()
This method will return the number of strings currently exist in the string pool |
java.lang.String |
GetString(int num)
This method will return the numth string currently in the string pool, null will be returned if the num is out of bound |
java.lang.String |
GetValue(java.lang.String name)
This method will return the value of the name in the string pool, null will be returned if no such value exist in the string pool |
void |
to_stream(packet_output_stream pos)
This method will print the content of this string pool object to a stream this method can be used with the above constructor in network environment |
void |
to_stream(java.io.PrintWriter pw)
This method will print the content of this string pool object to a stream this method can be used with the above constructor in network environment |
void |
toStream(java.io.OutputStream os)
This method will print the content of this string pool object to a stream this method can be used with the above constructor in network environment |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public StringPool(edu.vt.marian.common.Debug debug)
public StringPool(java.io.InputStream is,
edu.vt.marian.common.Debug debug)
public StringPool(packet_input_stream pis,
edu.vt.marian.common.Debug debug)
| Method Detail |
public void toStream(java.io.OutputStream os)
public void to_stream(java.io.PrintWriter pw)
public void to_stream(packet_output_stream pos)
public void AddString(java.lang.String s)
public void AddSubString(java.lang.String s)
public void AddValue(java.lang.String name,
java.lang.String value)
public java.lang.String GetValue(java.lang.String name)
public java.util.Vector get_names(java.lang.String value)
public java.util.Vector get_names()
public int GetNumStrings()
public java.lang.String GetString(int num)
public void DeleteString(int num)
public int GetNumLines(int num)
public void AddCGIData(java.lang.String data)
public int GetHexValue(java.lang.String digits)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||