org.refcodes.structure.CanonicalMap
, org.refcodes.structure.CanonicalMap.MutableCanonicalMap
, org.refcodes.structure.Clearable
, org.refcodes.structure.Containable
, org.refcodes.mixin.DelimiterAccessor
, org.refcodes.structure.Dictionary<String,T>
, org.refcodes.structure.Dictionary.MutableDictionary<String,T>
, org.refcodes.mixin.Dumpable
, Flushable
, org.refcodes.component.Flushable
, org.refcodes.structure.Keys<String,T>
, org.refcodes.structure.Keys.MutableKeys<String,T>
, org.refcodes.structure.Keys.MutableValues<String,T>
, Map<String,T>
, org.refcodes.structure.PathMap<String>
, org.refcodes.structure.PathMap.MutablePathMap<String>
, Properties
, Properties.MutableProperties
, org.refcodes.structure.PropertiesAccessorMixin
, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMutatorMixin
, ResourceProperties
, org.refcodes.mixin.TypeAccessor<String>
ResourceProperties.ResourcePropertiesBuilder
, ScheduledResourceProperties.ScheduledMuableResourceProperties
, ScheduledResourceProperties.ScheduledResourcePropertiesBuilder
AbstractResourcePropertiesBuilder
, AbstractResourcePropertiesBuilderDecorator
, JavaPropertiesBuilder
, JsonPropertiesBuilder
, ScheduledResourcePropertiesBuilderDecorator
, TomlPropertiesBuilder
, XmlPropertiesBuilder
, YamlPropertiesBuilder
public static interface ResourceProperties.MutableResoureProperties extends ResourceProperties, Properties.MutableProperties, org.refcodes.component.Flushable
ResourceProperties.MutableResoureProperties
defines "dirty" methods
allowing to modify ("mutate") the ResourceProperties
.org.refcodes.structure.CanonicalMap.CanonicalMapBuilder, org.refcodes.structure.CanonicalMap.MutableCanonicalMap
org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B extends org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B>>, org.refcodes.mixin.DelimiterAccessor.DelimiterMutator, org.refcodes.mixin.DelimiterAccessor.DelimiterProperty
org.refcodes.structure.Dictionary.MutableDictionary<K extends Object,V extends Object>
org.refcodes.structure.Dictionary.MutableDictionary.DictionaryBuilder<K extends Object,V extends Object,B extends org.refcodes.structure.Dictionary.MutableDictionary.DictionaryBuilder<K,V,B>>
org.refcodes.component.Flushable.FlushBuilder<B extends org.refcodes.component.Flushable.FlushBuilder<B>>
org.refcodes.structure.Keys.MutableKeys<K extends Object,V extends Object>, org.refcodes.structure.Keys.MutableValues<K extends Object,V extends Object>
Map.Entry<K extends Object,V extends Object>
org.refcodes.structure.PathMap.MutablePathMap<T extends Object>, org.refcodes.structure.PathMap.PathMapBuilder<T extends Object>
Properties.MutableProperties, Properties.PropertiesBuilder
org.refcodes.structure.PropertiesAccessorMixin.PropertiesBuilderMixin<T extends Object>, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMixin, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMutatorMixin
ResourceProperties.MutableResoureProperties, ResourceProperties.ResourcePropertiesBuilder
Modifier and Type | Field | Description |
---|---|---|
static String |
DEFAULT_COMMENT |
Modifier and Type | Method | Description |
---|---|---|
default File |
fileTo(File aFile) |
Files (writes) the properties to the given
File . |
default File |
fileTo(File aFile,
char aDelimiter) |
Files (writes) the properties to the given
File using the
provided delimiter as the destination's path delimiter. |
default File |
fileTo(File aFile,
String aComment) |
Files (writes) the properties to the given
File . |
default File |
fileTo(File aFile,
String aComment,
char aDelimiter) |
Files (writes) the properties to the given
File using the
provided delimiter as the destination's path delimiter. |
default File |
fileTo(String aFilePath) |
Files (writes) the properties to the given
File . |
default File |
fileTo(String aFilePath,
char aDelimiter) |
Files (writes) the properties to the given
File using the
provided delimiter as the destination's path delimiter. |
default File |
fileTo(String aFilePath,
String aComment) |
Files (writes) the properties to the
File represented by the
given file path. |
default File |
fileTo(String aFilePath,
String aComment,
char aDelimiter) |
Files (writes) the properties to the
File represented by the
given file path using the provided delimiter as the destination's
path delimiter. |
void |
flush() |
Flushes
ResourceProperties.MutableResoureProperties to the resource to which the
ResourceProperties are attached to (such as a File as
of loadFrom(File) or
saveTo(File) ). |
default Properties |
loadFrom(File aFile) |
Loads the properties from the given
File . |
Properties |
loadFrom(File aFile,
char... aDelimiters) |
Loads the properties from the given
File . |
default Properties |
loadFrom(InputStream aInputStream) |
Loads the properties from the given
InputStream . |
Properties |
loadFrom(InputStream aInputStream,
char... aDelimiters) |
Loads the properties from the given
InputStream . |
default Properties |
loadFrom(Class<?> aResourceClass,
String aFilePath) |
Loads the properties from the given class resource (from inside a
JAR).
|
default Properties |
loadFrom(Class<?> aResourceClass,
String aFilePath,
char... aDelimiters) |
Loads the properties from the given class resource (from inside a
JAR).
|
default Properties |
loadFrom(String aFilePath) |
Loads the properties from the given file path's
File . |
default Properties |
loadFrom(String aFilePath,
char... aDelimiters) |
Loads the properties from the given file path's
File . |
default Properties |
loadFrom(URL aUrl) |
Loads the properties from the given
URL . |
default Properties |
loadFrom(URL aUrl,
char... aDelimiters) |
Loads the properties from the given
URL . |
default void |
parseFrom(String aSerialized) |
Inspects the given serialized representation and adds all declared
elements found.
|
default void |
parseFrom(String aSerialized,
char... aDelimiters) |
Inspects the given serialized representation and adds all declared
elements found.
|
default File |
saveTo(File aFile) |
Saves the properties to the given
File . |
default File |
saveTo(File aFile,
char aDelimiter) |
Saves the properties to the given
File using the provided
delimiter as the destination's path delimiter. |
default File |
saveTo(File aFile,
String aComment) |
Saves the properties to the given
File . |
File |
saveTo(File aFile,
String aComment,
char aDelimiter) |
Saves the properties to the given
File using the provided
delimiter as the destination's path delimiter. |
default void |
saveTo(OutputStream aOutputStream) |
Saves the properties to the given
OutputStream . |
default void |
saveTo(OutputStream aOutputStream,
char aDelimiter) |
Saves the properties to the given
OutputStream . |
default void |
saveTo(OutputStream aOutputStream,
String aComment) |
Saves the properties to the given
OutputStream . |
void |
saveTo(OutputStream aOutputStream,
String aComment,
char aDelimiter) |
Saves the properties to the given
OutputStream using the
provided delimiter as the destination's path delimiter. |
default File |
saveTo(String aFilePath) |
Saves the properties to the given
File . |
default File |
saveTo(String aFilePath,
char aDelimiter) |
Saves the properties to the given
File using the provided
delimiter as the destination's path delimiter. |
default File |
saveTo(String aFilePath,
String aComment) |
Saves the properties to the
File represented by the given
file path. |
default File |
saveTo(String aFilePath,
String aComment,
char aDelimiter) |
Saves the properties to the
File represented by the given
file path using the provided delimiter as the destination's path
delimiter. |
default Properties |
seekFrom(File aFile) |
Loads a properties file from the file directly or (if not found) from
first folder containing such a file as of the specification for the
method
RuntimeUtility.toConfigDirs() . |
default Properties |
seekFrom(File aFile,
char... aDelimiters) |
Loads a properties file from the file directly or (if not found) from
first folder containing such a file as of the specification for the
method
RuntimeUtility.toConfigDirs() . |
default Properties |
seekFrom(Class<?> aResourceClass,
String aFilePath) |
Loads a properties file from the file path directly or (if not found)
from the first folder containing such a file as of the specification
for the method
RuntimeUtility.toConfigDirs() . |
Properties |
seekFrom(Class<?> aResourceClass,
String aFilePath,
char... aDelimiters) |
Loads a properties file from the file path directly or (if not found)
from the first folder containing such a file as of the specification
for the method
RuntimeUtility.toConfigDirs() . |
default Properties |
seekFrom(String aFilePath) |
Loads a properties file from the file path directly or (if not found)
from the first folder containing such a file as of the specification
for the method
RuntimeUtility.toConfigDirs() . |
default Properties |
seekFrom(String aFilePath,
char... aDelimiters) |
Loads a properties file from the file path directly or (if not found)
from the first folder containing such a file as of the specification
for the method
RuntimeUtility.toConfigDirs() . |
default String |
toSerialized() |
Produces the external representation of the properties as of the
serialized format supported by the implementing class.
|
default String |
toSerialized(char aDelimiter) |
Produces the external representation of the properties as of the
serialized format supported by the implementing class.
|
toInstance, toInstance, toType, toType
insert, insert, insertFrom, insertTo, putAll, toDump, toSourceCode, toSourceCode
containsKey, get, get, keySet, use, values
clear, compute, computeIfAbsent, computeIfPresent, containsKey, entry, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, of, of, of, of, of, of, of, of, of, of, of, ofEntries, put, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
directories, directories, entries, entries, fromExternalKey, getArray, getArray, getRootPath, hasParentPath, isArray, isArray, isDirectory, isEntry, isRecord, isRootPath, keySet, paths, paths, records, records, toDataStructure, toDataStructure, toExternalKey, toMap, toNormalizedPath, toNormalizedPath, toParentPath, toPath
insert, insert, insert, insert, insertFrom, insertFrom, insertTo, insertTo, put, putArray, putArray, removeAll
childrenOf, getDelimiter, getType, retrieve, retrieveFrom, retrieveTo, toMap, toProperties, toPropertyPath
containsValue, delete, delete, insert, insert, insertFrom, insertTo, put, putAll, putAll, putAll
containsKey, get, getBoolean, getBoolean, getByte, getByte, getCharacter, getCharacter, getDouble, getDouble, getFloat, getFloat, getInteger, getInteger, getLong, getLong, getShort, getShort, use, useBoolean, useBoolean, useByte, useByte, useDouble, useDouble, useFloat, useFloat, useInteger, useInteger, useLong, useLong, useShort, useShort
put, put, putBoolean, putBoolean, putByte, putByte, putDouble, putDouble, putFloat, putFloat, putInteger, putInteger, putLong, putLong, putShort, putShort
reload, reload
static final String DEFAULT_COMMENT
default String toSerialized()
default String toSerialized(char aDelimiter)
aDelimiter
- The path delimiter to be used when serializing the
properties (in case the the serialized format supports /
requires the such).default File saveTo(String aFilePath) throws IOException
File
. Load them via
loadFrom(File)
The default implementation uses the hook method
saveTo(OutputStream, String, char)
to finally format and
write the properties.aFilePath
- The file path from which to load the properties.File
representing the actual location where the
properties have been saved to.IOException
- thrown in case saving the properties faileddefault File saveTo(String aFilePath, char aDelimiter) throws IOException
File
using the provided
delimiter as the destination's path delimiter. Load them via
loadFrom(String, char...)
The default implementation uses the hook method
saveTo(OutputStream, String, char)
to finally format and
write the properties.aFilePath
- The file path from which to load the properties.aDelimiter
- The path delimiter to be used when writing out the
properties to the destination (in case the the serialized
format supports / requires the such).File
representing the actual location where the
properties have been saved to.IOException
- thrown in case saving the properties faileddefault File saveTo(File aFile) throws IOException
File
. Load them via
loadFrom(File)
.
The default implementation uses the hook method
saveTo(OutputStream, String, char)
to finally format and
write the properties.aFile
- The File
from which to load the properties.File
representing the actual location where the
properties have been saved to.IOException
- thrown in case saving the properties faileddefault File saveTo(File aFile, char aDelimiter) throws IOException
File
using the provided
delimiter as the destination's path delimiter. Load them via
loadFrom(File, char...)
.
The default implementation uses the hook method
saveTo(OutputStream, String, char)
to finally format and
write the properties.aFile
- The File
from which to load the properties.aDelimiter
- The path delimiter to be used when writing out the
properties to the destination (in case the the serialized
format supports / requires the such).File
representing the actual location where the
properties have been saved to.IOException
- thrown in case saving the properties faileddefault File saveTo(String aFilePath, String aComment) throws IOException
File
represented by the given
file path. Load them via
loadFrom(String)
.
The default implementation uses the hook method
saveTo(OutputStream, String, char)
to finally format and
write the properties.aFilePath
- The file path from which to load the properties.aComment
- The description for the properties file.File
representing the actual location where the
properties have been saved to.IOException
- thrown in case saving the properties faileddefault File saveTo(String aFilePath, String aComment, char aDelimiter) throws IOException
File
represented by the given
file path using the provided delimiter as the destination's path
delimiter. Load them via
loadFrom(File, char...)
.
The default implementation uses the hook method
saveTo(OutputStream, String, char)
to finally format and
write the properties.aFilePath
- The file path from which to load the properties.aDelimiter
- The path delimiter to be used when writing out the
properties to the destination (in case the the serialized
format supports / requires the such).aComment
- The description for the properties file.File
representing the actual location where the
properties have been saved to.IOException
- thrown in case saving the properties faileddefault File saveTo(File aFile, String aComment) throws IOException
File
. Load them via
loadFrom(File)
.
The default implementation uses the hook method
saveTo(OutputStream, String, char)
to finally format and
write the properties.aFile
- The File
from which to load the properties.aComment
- The description for the properties file.File
representing the actual location where the
properties have been saved to.IOException
- thrown in case saving the properties failedFile saveTo(File aFile, String aComment, char aDelimiter) throws IOException
File
using the provided
delimiter as the destination's path delimiter. Load them via
loadFrom(File, char...)
.
The default implementation uses the hook method
saveTo(OutputStream, String, char)
to finally format and
write the properties.aFile
- The File
from which to load the properties.aComment
- The description for the properties file.aDelimiter
- The path delimiter to be used when writing out the
properties to the destination (in case the the serialized
format supports / requires the such).File
representing the actual location where the
properties have been saved to.IOException
- thrown in case saving the properties faileddefault void saveTo(OutputStream aOutputStream) throws IOException
OutputStream
. Load them via
loadFrom(InputStream)
.
The default implementation uses the hook method
saveTo(OutputStream, String, char)
to finally format and
write the properties.aOutputStream
- the output streamIOException
- thrown in case saving the properties faileddefault void saveTo(OutputStream aOutputStream, char aDelimiter) throws IOException
OutputStream
. Load them via
loadFrom(InputStream, char...)
.
The default implementation uses the hook method
saveTo(OutputStream, String, char)
to finally format and
write the properties.aOutputStream
- the OutputStream
where to write the
properties to.aDelimiter
- The path delimiter to be used when writing out the
properties to the destination (in case the the serialized
format supports / requires the such).IOException
- thrown in case saving the properties faileddefault void saveTo(OutputStream aOutputStream, String aComment) throws IOException
OutputStream
. Load them via
loadFrom(InputStream)
The default implementation uses the hook method
saveTo(OutputStream, String, char)
to finally format and
write the properties.aOutputStream
- The OutputStream
to which to save the
properties to.aComment
- The description for the properties file.IOException
- thrown in case saving the properties failedvoid saveTo(OutputStream aOutputStream, String aComment, char aDelimiter) throws IOException
OutputStream
using the
provided delimiter as the destination's path delimiter. Load them via
loadFrom(InputStream, char...)
This is the hook-method of the default implementation for writing
(saving) the properties. In case you want to implement
ResourceProperties
which support other notations than the
properties notation (path=value
), then you overwrite
this method in your implementation accordingly.aOutputStream
- The OutputStream
to which to save the
properties to.aComment
- The description for the properties file.aDelimiter
- The path delimiter to be used when writing out the
properties to the destination (in case the the serialized
format supports / requires the such).IOException
- thrown in case saving the properties faileddefault File fileTo(String aFilePath) throws IOException
File
. The
properties are filed to the first folder detected by the method
RuntimeUtility.toConfigDirs(File)
. Load them via
seekFrom(File)
The default implementation uses the hook method
fileTo(String, String, char)
to finally format and write the
properties.aFilePath
- The file path from which to load the properties.File
representing the actual location where the
properties have been saved to.IOException
- thrown in case saving the properties faileddefault File fileTo(String aFilePath, char aDelimiter) throws IOException
File
using the
provided delimiter as the destination's path delimiter. The
properties are filed to the first folder detected by the method
RuntimeUtility.toConfigDirs(File)
. Load them via
seekFrom(String, char...)
The default implementation uses the hook method
fileTo(File, String, char)
to finally format and write the
properties.aFilePath
- The file path from which to load the properties.aDelimiter
- The path delimiter to be used when writing out the
properties to the destination (in case the the serialized
format supports / requires the such).File
representing the actual location where the
properties have been saved to.IOException
- thrown in case saving the properties faileddefault File fileTo(File aFile) throws IOException
File
. The
properties are filed to the first folder detected by the method
RuntimeUtility.toConfigDirs(File)
. Load them via
seekFrom(File)
.
The default implementation uses the hook method
fileTo(File, String, char)
to finally format and write the
properties.aFile
- The File
from which to load the properties.File
representing the actual location where the
properties have been saved to.IOException
- thrown in case saving the properties faileddefault File fileTo(File aFile, char aDelimiter) throws IOException
File
using the
provided delimiter as the destination's path delimiter. The
properties are filed to the first folder detected by the method
RuntimeUtility.toConfigDirs(File)
. Load them via
seekFrom(File, char...)
.
The default implementation uses the hook method
fileTo(File, String, char)
to finally format and write the
properties.aFile
- The File
from which to load the properties.aDelimiter
- The path delimiter to be used when writing out the
properties to the destination (in case the the serialized
format supports / requires the such).File
representing the actual location where the
properties have been saved to.IOException
- thrown in case saving the properties faileddefault File fileTo(String aFilePath, String aComment) throws IOException
File
represented by the
given file path. The properties are filed to the first folder
detected by the method RuntimeUtility.toConfigDirs(File)
.
Load them via seekFrom(String)
.
The default implementation uses the hook method
fileTo(File, String, char)
to finally format and write the
properties.aFilePath
- The file path from which to load the properties.aComment
- The description for the properties file.File
representing the actual location where the
properties have been saved to.IOException
- thrown in case saving the properties faileddefault File fileTo(String aFilePath, String aComment, char aDelimiter) throws IOException
File
represented by the
given file path using the provided delimiter as the destination's
path delimiter. The properties are filed to the first folder detected
by the method RuntimeUtility.toConfigDirs(File)
. Load them
via seekFrom(File, char...)
.
The default implementation uses the hook method
fileTo(File, String, char)
to finally format and write the
properties.aFilePath
- The file path from which to load the properties.aDelimiter
- The path delimiter to be used when writing out the
properties to the destination (in case the the serialized
format supports / requires the such).aComment
- The description for the properties file.File
representing the actual location where the
properties have been saved to.IOException
- thrown in case saving the properties faileddefault File fileTo(File aFile, String aComment) throws IOException
File
. The
properties are filed to the first folder detected by the method
RuntimeUtility.toConfigDirs(File)
. Load them via
seekFrom(File)
.
The default implementation uses the hook method
fileTo(File, String, char)
to finally format and write the
properties.aFile
- The File
from which to load the properties.aComment
- The description for the properties file.File
representing the actual location where the
properties have been saved to.IOException
- thrown in case saving the properties faileddefault File fileTo(File aFile, String aComment, char aDelimiter) throws IOException
File
using the
provided delimiter as the destination's path delimiter. The
properties are filed to the first folder detected by the method
RuntimeUtility.toConfigDirs(File)
. Load them via
seekFrom(File, char...)
.aFile
- The File
from which to load the properties.aComment
- The description for the properties file.aDelimiter
- The path delimiter to be used when writing out the
properties to the destination (in case the the serialized
format supports / requires the such).File
representing the actual location where the
properties have been saved to.IOException
- thrown in case saving the properties failedvoid flush() throws org.refcodes.component.OpenException
ResourceProperties.MutableResoureProperties
to the resource to which the
ResourceProperties
are attached to (such as a File
as
of loadFrom(File)
or
saveTo(File)
).
default Properties loadFrom(String aFilePath) throws IOException, ParseException
File
. Save
them using the method saveTo(String)
.
The default implementation uses the hook method
loadFrom(InputStream, char...)
to finally load and parse the
properties.aFilePath
- The file path from which to load the properties.Properties
as loaded from the resource and
applied to this instance.IOException
- thrown in case loading the properties failedParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded..default Properties loadFrom(Class<?> aResourceClass, String aFilePath) throws IOException, ParseException
loadFrom(InputStream, char...)
to finally load and parse the
properties.aResourceClass
- The class which's class loader is to take care
of loading the properties (from inside a JAR).aFilePath
- The file path of the class's resources from which to
load the properties.Properties
as loaded from the resource and
applied to this instance.IOException
- thrown in case loading the properties failedParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.default Properties loadFrom(String aFilePath, char... aDelimiters) throws IOException, ParseException
File
. Save
them using the method saveTo(String, char)
.
The default implementation uses the hook method
loadFrom(InputStream, char...)
to finally load and parse the
properties.aFilePath
- The file path from which to load the properties.aDelimiters
- The path delimiters to be used when parsing the
source's properties (in case the the serialized format
supports / requires the such).Properties
as loaded from the resource and
applied to this instance.IOException
- thrown in case loading the properties failedParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.default Properties loadFrom(Class<?> aResourceClass, String aFilePath, char... aDelimiters) throws IOException, ParseException
loadFrom(InputStream, char...)
to finally load and parse the
properties.aResourceClass
- The class which's class loader is to take care
of loading the properties (from inside a JAR).aFilePath
- The file path of the class's resources from which to
load the properties.aDelimiters
- The path delimiters to be used when parsing the
source's properties (in case the the serialized format
supports / requires the such).Properties
as loaded from the resource and
applied to this instance.IOException
- thrown in case loading the properties failedParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.default Properties loadFrom(File aFile) throws IOException, ParseException
File
. Save them using the
method saveTo(File)
.
The default implementation uses the hook method
loadFrom(InputStream, char...)
to finally load and parse the
properties.aFile
- The File
from which to load the properties.Properties
as loaded from the resource and
applied to this instance.IOException
- thrown in case loading the properties failedParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.Properties loadFrom(File aFile, char... aDelimiters) throws IOException, ParseException
File
. Save them using the
method saveTo(File)
.
The default implementation uses the hook method
loadFrom(InputStream, char...)
to finally load and parse the
properties.aFile
- The File
from which to load the properties.aDelimiters
- The path delimiters to be used when parsing the
source's properties (in case the the serialized format
supports / requires the such).Properties
as loaded from the resource and
applied to this instance.IOException
- thrown in case loading the properties failedParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.default Properties loadFrom(URL aUrl) throws IOException, ParseException
URL
.
The default implementation uses the hook method
loadFrom(InputStream, char...)
to finally load and parse the
properties.aUrl
- The URL
from which to load the properties.Properties
as loaded from the resource and
applied to this instance.IOException
- thrown in case loading the properties failedParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.default Properties loadFrom(URL aUrl, char... aDelimiters) throws IOException, ParseException
URL
.
The default implementation uses the hook method
loadFrom(InputStream, char...)
to finally load and parse the
properties.aUrl
- The URL
from which to load the properties.aDelimiters
- The path delimiters to be used when parsing the
source's properties (in case the the serialized format
supports / requires the such).Properties
as loaded from the resource and
applied to this instance.IOException
- thrown in case loading the properties failedParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.default Properties loadFrom(InputStream aInputStream) throws IOException, ParseException
InputStream
. Save them
using the method saveTo(OutputStream)
.
The default implementation uses the hook method
loadFrom(InputStream, char...)
to finally load and parse the
properties.aInputStream
- The InputStream
from which to load the
properties.Properties
as loaded from the resource and
applied to this instance.IOException
- thrown in case loading the properties failedParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.Properties loadFrom(InputStream aInputStream, char... aDelimiters) throws IOException, ParseException
InputStream
. Save them
using the method saveTo(OutputStream)
.
This is the hook-method of the default implementation for loading the
properties. In case you want to implement ResourceProperties
which support other notations than the properties notation
(path=value
), then you overwrite this method in your
implementation accordingly.aInputStream
- The InputStream
from which to load the
properties.aDelimiters
- The path delimiters to be used when parsing the
source's properties (in case the the serialized format
supports / requires the such).Properties
as loaded from the resource and
applied to this instance.IOException
- thrown in case loading the properties failedParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.default void parseFrom(String aSerialized) throws ParseException
Map
,
Collection
and arrays are identified and handled as of their
type: The path for each value in a Map
is appended with its
according key. The path for each value in a Collection
or
array is appended with its according index of occurrence (in case of
a List
or an array, its actual index).
The default implementation uses the hook method
loadFrom(InputStream, char...)
to finally load and parse the
properties.aSerialized
- The serialized representation which is to be
parsed for the therein declared elements being added with
their according determined paths.ParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.default void parseFrom(String aSerialized, char... aDelimiters) throws ParseException
Map
,
Collection
and arrays are identified and handled as of their
type: The path for each value in a Map
is appended with its
according key. The path for each value in a Collection
or
array is appended with its according index of occurrence (in case of
a List
or an array, its actual index).
The default implementation uses the hook method
loadFrom(InputStream, char...)
to finally load and parse the
properties.aSerialized
- The serialized representation which is to be
parsed for the therein declared elements being added with
their according determined paths.aDelimiters
- The path delimiters to be used when parsing the
source's properties (in case the the serialized format
supports / requires the such).ParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.default Properties seekFrom(File aFile) throws IOException, ParseException
RuntimeUtility.toConfigDirs()
.
The default implementation uses the hook method
loadFrom(InputStream, char...)
to finally load and parse the
properties.aFile
- The file of the properties file to load.Properties
as loaded from the resource and
applied to this instance.IOException
- thrown in case accessing or processing the
properties file failed.ParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.default Properties seekFrom(File aFile, char... aDelimiters) throws IOException, ParseException
RuntimeUtility.toConfigDirs()
.
The default implementation uses the hook method
loadFrom(InputStream, char...)
to finally load and parse the
properties.aFile
- The file of the properties file to load.aDelimiters
- The path delimiters to be used when parsing the
source's properties (in case the the serialized format
supports / requires the such).Properties
as loaded from the resource and
applied to this instance.IOException
- thrown in case accessing or processing the
properties file failed.ParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.default Properties seekFrom(String aFilePath) throws IOException, ParseException
RuntimeUtility.toConfigDirs()
.
The default implementation uses the hook method
loadFrom(InputStream, char...)
to finally load and parse the
properties.aFilePath
- The file path from which to load the properties.Properties
as loaded from the resource and
applied to this instance.IOException
- thrown in case accessing or processing the
properties file failed.ParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.default Properties seekFrom(Class<?> aResourceClass, String aFilePath) throws IOException, ParseException
RuntimeUtility.toConfigDirs()
. Finally (if
nothing else succeeds) the properties are loaded by the provided
class's class loader which takes care of loading the properties (in
case the file path is a relative path, also the absolute path with a
prefixed path delimiter "/" is probed).
The default implementation uses the hook method
loadFrom(InputStream, char...)
to finally load and parse the
properties.aResourceClass
- The class which's class loader is to take care
of loading the properties (from inside a JAR).aFilePath
- The file path from which to load the properties.Properties
as loaded from the resource and
applied to this instance.IOException
- thrown in case accessing or processing the
properties file failed.ParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.default Properties seekFrom(String aFilePath, char... aDelimiters) throws IOException, ParseException
RuntimeUtility.toConfigDirs()
.
The default implementation uses the hook method
loadFrom(InputStream, char...)
to finally load and parse the
properties.aFilePath
- The file path from which to load the properties.aDelimiters
- The path delimiters to be used when parsing the
source's properties (in case the the serialized format
supports / requires the such).Properties
as loaded from the resource and
applied to this instance.IOException
- thrown in case accessing or processing the
properties file failed.ParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.Properties seekFrom(Class<?> aResourceClass, String aFilePath, char... aDelimiters) throws IOException, ParseException
RuntimeUtility.toConfigDirs()
. Finally (if
nothing else succeeds) the properties are loaded by the provided
class's class loader which takes care of loading the properties (in
case the file path is a relative path, also the absolute path with a
prefixed path delimiter "/" is probed).
The default implementation uses the hook method
loadFrom(InputStream, char...)
to finally load and parse the
properties.aResourceClass
- The class which's class loader is to take care
of loading the properties (from inside a JAR).aFilePath
- The file path from which to load the properties.aDelimiters
- The path delimiters to be used when parsing the
source's properties (in case the the serialized format
supports / requires the such).Properties
as loaded from the resource and
applied to this instance.IOException
- thrown in case accessing or processing the
properties file failed.ParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.Copyright © 2018. All rights reserved.