|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Dictionary<K,V>
java.util.Hashtable<Object,Object>
java.util.Properties
org.apache.ftpserver.util.BaseProperties
public class BaseProperties
This class encapsulates java.util.Properties
to
add java primitives and some other java classes.
Field Summary |
---|
Fields inherited from class java.util.Properties |
---|
defaults |
Constructor Summary | |
---|---|
BaseProperties()
Default constructor. |
|
BaseProperties(File fl)
Load properties from file |
|
BaseProperties(InputStream is)
Load properties from InputStream |
|
BaseProperties(Properties prop)
Load existing property. |
Method Summary | |
---|---|
List |
getAllKeys()
Get all property key names. |
boolean |
getBoolean(String str)
Get boolean value. |
boolean |
getBoolean(String str,
boolean bol)
|
Class |
getClass(String str)
Get Class object |
Class |
getClass(String str,
Class cls)
|
Date |
getDate(String str,
DateFormat fmt)
Get Date object. |
Date |
getDate(String str,
DateFormat fmt,
Date dt)
|
SimpleDateFormat |
getDateFormat(String str)
Get DateFormat object. |
SimpleDateFormat |
getDateFormat(String str,
SimpleDateFormat fmt)
|
double |
getDouble(String str)
Get double value. |
double |
getDouble(String str,
double doubleVal)
|
File |
getFile(String str)
Get File object. |
File |
getFile(String str,
File fl)
|
InetAddress |
getInetAddress(String str)
Get InetAddress . |
InetAddress |
getInetAddress(String str,
InetAddress addr)
|
int |
getInteger(String str)
Get integer value. |
int |
getInteger(String str,
int intVal)
|
long |
getLong(String str)
Get long value. |
long |
getLong(String str,
long val)
|
TimeZone |
getTimeZone(String str)
Get TimeZone |
TimeZone |
getTimeZone(String str,
TimeZone tz)
|
void |
setInetAddress(String key,
InetAddress val)
Set InetAddress . |
void |
setProperty(String key,
boolean val)
Set boolean value. |
void |
setProperty(String key,
Class val)
Set Class object. |
void |
setProperty(String key,
Date val,
DateFormat fmt)
Set Date object. |
void |
setProperty(String key,
double val)
Set double value. |
void |
setProperty(String key,
File val)
Set File object. |
void |
setProperty(String key,
float val)
Set float value. |
void |
setProperty(String key,
int val)
Set integer value. |
void |
setProperty(String key,
long val)
Set long value. |
void |
setProperty(String key,
SimpleDateFormat val)
Set DateFormat object. |
void |
setProperty(String key,
TimeZone val)
Set TimeZone object. |
Methods inherited from class java.util.Properties |
---|
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames |
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 |
Constructor Detail |
---|
public BaseProperties()
public BaseProperties(Properties prop)
public BaseProperties(File fl) throws IOException
IOException
public BaseProperties(InputStream is) throws IOException
InputStream
IOException
Method Detail |
---|
public List getAllKeys()
public boolean getBoolean(String str) throws PropertiesException
PropertiesException
public boolean getBoolean(String str, boolean bol)
public int getInteger(String str) throws PropertiesException
PropertiesException
public int getInteger(String str, int intVal)
public long getLong(String str) throws PropertiesException
PropertiesException
public long getLong(String str, long val)
public double getDouble(String str) throws PropertiesException
PropertiesException
public double getDouble(String str, double doubleVal)
public InetAddress getInetAddress(String str) throws PropertiesException
InetAddress
.
PropertiesException
public InetAddress getInetAddress(String str, InetAddress addr)
public File getFile(String str) throws PropertiesException
File
object.
PropertiesException
public File getFile(String str, File fl)
public Class getClass(String str) throws PropertiesException
Class
object
PropertiesException
public Class getClass(String str, Class cls)
public TimeZone getTimeZone(String str) throws PropertiesException
TimeZone
PropertiesException
public TimeZone getTimeZone(String str, TimeZone tz)
public SimpleDateFormat getDateFormat(String str) throws PropertiesException
DateFormat
object.
PropertiesException
public SimpleDateFormat getDateFormat(String str, SimpleDateFormat fmt)
public Date getDate(String str, DateFormat fmt) throws PropertiesException
Date
object.
PropertiesException
public Date getDate(String str, DateFormat fmt, Date dt)
public void setProperty(String key, boolean val)
public void setProperty(String key, int val)
public void setProperty(String key, double val)
public void setProperty(String key, float val)
public void setProperty(String key, long val)
public void setInetAddress(String key, InetAddress val)
InetAddress
.
public void setProperty(String key, File val)
File
object.
public void setProperty(String key, SimpleDateFormat val)
DateFormat
object.
public void setProperty(String key, TimeZone val)
TimeZone
object.
public void setProperty(String key, Date val, DateFormat fmt)
Date
object.
public void setProperty(String key, Class val)
Class
object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |