public class PropertiesImpl extends Properties
Properties implementation that overrides
load(InputStream) and store(OutputStream,String)
methods to specify the Charset (as UTF-8).| Modifier and Type | Field and Description |
|---|---|
protected static Charset |
CHARSET
UTF-8
|
defaults| Constructor and Description |
|---|
PropertiesImpl()
See
Properties(). |
PropertiesImpl(Properties defaults)
|
PropertiesImpl(Properties defaults,
File file)
|
PropertiesImpl(Properties defaults,
String resource)
|
| Modifier and Type | Method and Description |
|---|---|
Object |
configure(Object object)
|
static Object |
configure(Properties properties,
Object object)
See
configure(Object). |
void |
load(InputStream in) |
protected static void |
load(Properties properties,
InputStream in) |
void |
store(OutputStream out,
String comment) |
protected static void |
store(Properties properties,
OutputStream out,
String comment) |
getProperty, getProperty, list, list, load, loadFromXML, propertyNames, save, setProperty, store, storeToXML, storeToXML, stringPropertyNamesclear, 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, valuespublic PropertiesImpl()
Properties().public PropertiesImpl(Properties defaults)
defaults - A Properties that contains default
values for any keys not found in this
Properties.public PropertiesImpl(Properties defaults, File file) throws IOException
defaults - The default Properties.file - The File to load
(may be null).IOException - If file is not null and cannot be
read.public PropertiesImpl(Properties defaults, String resource) throws IOException
defaults - The default Properties.resource - The name of the resource to load
(may be null).IOException - If resource is not null and cannot be
read.public Object configure(Object object) throws Exception
Object properties with values in
this PropertiesImpl. (An Object "setter"
does not have to return void to be invoked.)public void load(InputStream in) throws IOException
load in class PropertiesIOExceptionpublic void store(OutputStream out, String comment) throws IOException
store in class PropertiesIOExceptionprotected static void load(Properties properties, InputStream in) throws IOException
IOExceptionprotected static void store(Properties properties, OutputStream out, String comment) throws IOException
IOExceptionpublic static Object configure(Properties properties, Object object) throws Exception
configure(Object).properties - The Properties with the
configuration parameters..object - The Object to configure.Object.Exception - If any problem is encountered.Copyright © 2015–2021. All rights reserved.