public class BaseProperties extends Properties
java.util.Properties
to add java
primitives and some other java classes.defaults
Constructor and Description |
---|
BaseProperties()
Default constructor.
|
BaseProperties(Properties prop)
Load existing property.
|
Modifier and Type | Method and Description |
---|---|
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) |
String |
getString(String str)
Get
String . |
String |
getString(String str,
String s) |
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. |
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames
clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keys, keySet, merge, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, size, toString, values
public BaseProperties()
public BaseProperties(Properties prop)
public boolean getBoolean(String str) throws FtpException
FtpException
public boolean getBoolean(String str, boolean bol)
public int getInteger(String str) throws FtpException
FtpException
public int getInteger(String str, int intVal)
public long getLong(String str) throws FtpException
FtpException
public long getLong(String str, long val)
public double getDouble(String str) throws FtpException
FtpException
public double getDouble(String str, double doubleVal)
public InetAddress getInetAddress(String str) throws FtpException
InetAddress
.FtpException
public InetAddress getInetAddress(String str, InetAddress addr)
public String getString(String str) throws FtpException
String
.FtpException
public File getFile(String str) throws FtpException
File
object.FtpException
public Class<?> getClass(String str) throws FtpException
Class
objectFtpException
public TimeZone getTimeZone(String str) throws FtpException
TimeZone
FtpException
public SimpleDateFormat getDateFormat(String str) throws FtpException
DateFormat
object.FtpException
public SimpleDateFormat getDateFormat(String str, SimpleDateFormat fmt)
public Date getDate(String str, DateFormat fmt) throws FtpException
Date
object.FtpException
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, SimpleDateFormat val)
DateFormat
object.public void setProperty(String key, Date val, DateFormat fmt)
Date
object.Copyright © 2003–2016 The Apache Software Foundation. All rights reserved.