|
Email Answering System Version 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Dictionary | +--java.util.Hashtable | +--java.util.Properties | +--com.ninecode.email.util.EmailProperties
Basket for mail.XXXX properties. This class reads and writes it's properties as a single delimited string.
Field Summary | |
protected static String |
mDelims
Possible delimiter characters (on output). |
protected static char[] |
mHexDigits
A table of hex digits. |
protected static String |
mSpecialSaveChars
Characters receiving unicode escape handling on output. |
Fields inherited from class java.util.Properties |
defaults |
Constructor Summary | |
EmailProperties()
Creates an empty instance of EmailProperties. |
|
EmailProperties(Properties properties)
Creates an instance of EmailProperties backed by the given properties. |
|
EmailProperties(String properties)
Creates an instance of EmailProperties containing the given properties. |
Method Summary | |
protected String |
convert(String theString,
boolean escapeSpace)
Reformats a property value for saving in a string. |
boolean |
equals(Object other)
Check for equality. |
protected static char |
hex(int nibble)
Convert a nibble to a hex character |
void |
parseString(String string)
Adds the properties provided in the string to this email properties. |
String |
toString()
Converts the current values of all the properties to a string. |
Methods inherited from class java.util.Properties |
getProperty, getProperty, list, list, load, propertyNames, save, setProperty, store |
Methods inherited from class java.util.Hashtable |
clear, clone, contains, containsKey, containsValue, elements, entrySet, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, values |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static final String mDelims
protected static final String mSpecialSaveChars
protected static final char[] mHexDigits
Constructor Detail |
public EmailProperties()
public EmailProperties(Properties properties)
public EmailProperties(String properties)
parseString(java.lang.String)
Method Detail |
public void parseString(String string)
|mail.from=tobias@linkone.com|mail.smtp.auth=true|
string
- The value to parse.
IllegalArgumentException
- if the string does
not start and end with the same character or after
converting the delimiter to newlines, the properties cannot
be loaded.public String toString()
toString
in class Hashtable
IllegalStateException
- If a delimiter cannot be chosen
that doesn't conflict with the contents of the properties.protected String convert(String theString, boolean escapeSpace)
This and hex()
are copied from java.util.Properties and
are only repeated here because some neophyte at Sun thought a utility
function like this should be private, what a dolt.
Never thought someone might subclass properties? Idiot.
protected static char hex(int nibble)
nibble
- The nibble to convert.
public boolean equals(Object other)
equals
in interface Map
equals
in class Hashtable
other
- The other object to compare against.
|
Email Answering System Version 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |