Flushable
, Serializable
, Cloneable
, Map<String,String>
, org.refcodes.component.Flushable
, org.refcodes.component.Flushable.FlushBuilder<ResourceProperties.ResourcePropertiesBuilder>
, Properties
, Properties.MutableProperties
, Properties.PropertiesBuilder
, ResourceProperties
, ResourceProperties.MutableResoureProperties
, ResourceProperties.ResourcePropertiesBuilder
, org.refcodes.mixin.DelimiterAccessor
, org.refcodes.mixin.Dumpable
, org.refcodes.mixin.TypeAccessor<String>
, org.refcodes.structure.CanonicalMap
, org.refcodes.structure.CanonicalMap.CanonicalMapBuilder
, org.refcodes.structure.CanonicalMap.MutableCanonicalMap
, org.refcodes.structure.Clearable
, org.refcodes.structure.Containable
, org.refcodes.structure.Dictionary<String,String>
, org.refcodes.structure.Dictionary.MutableDictionary<String,String>
, org.refcodes.structure.Dictionary.MutableDictionary.DictionaryBuilder<String,String,org.refcodes.structure.PathMap.PathMapBuilder<String>>
, org.refcodes.structure.Keys<String,String>
, org.refcodes.structure.Keys.MutableKeys<String,String>
, org.refcodes.structure.Keys.MutableValues<String,String>
, org.refcodes.structure.PathMap<String>
, org.refcodes.structure.PathMap.MutablePathMap<String>
, org.refcodes.structure.PathMap.PathMapBuilder<String>
, org.refcodes.structure.PropertiesAccessorMixin
, org.refcodes.structure.PropertiesAccessorMixin.PropertiesBuilderMixin<org.refcodes.structure.CanonicalMap.CanonicalMapBuilder>
, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMixin
, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMutatorMixin
public class TomlPropertiesBuilder extends AbstractResourcePropertiesBuilder implements ResourceProperties.ResourcePropertiesBuilder
ResourceProperties.ResourcePropertiesBuilder
interface with
support of so called "TOML properties".
For TOML properties, see "https://en.wikipedia.org/wiki/TOML"Modifier and Type | Class | Description |
---|---|---|
static class |
TomlPropertiesBuilder.TomlPropertiesBuilderFactory |
The
TomlPropertiesBuilder.TomlPropertiesBuilderFactory represents a
ResourcePropertiesFactory.ResourcePropertiesBuilderFactory creating instances of type
TomlPropertiesBuilder . |
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
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.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 char[] |
COMMENTS |
|
static char[] |
DELIMITERS |
|
static char |
SECTION_BEGIN |
|
static char |
SECTION_END |
_propertiesFile
VALUE_ATTRIBUTES
DEFAULT_COMMENT
Constructor | Description |
---|---|
TomlPropertiesBuilder() |
Create an empty
TomlPropertiesBuilder instance using the default
path delimiter "/" (Delimiter.PATH ) for the path declarations. |
TomlPropertiesBuilder(File aFile) |
Loads the TOML properties from the given
File . |
TomlPropertiesBuilder(File aFile,
char... aDelimiters) |
Loads the TOML properties from the given
File . |
TomlPropertiesBuilder(File aFile,
org.refcodes.runtime.ConfigLocator aConfigLocator) |
Loads or seeks the TOML properties from the given
File . |
TomlPropertiesBuilder(File aFile,
org.refcodes.runtime.ConfigLocator aConfigLocator,
char... aDelimiters) |
Loads or seeks the TOML properties from the given
File . |
TomlPropertiesBuilder(InputStream aInputStream) |
Reads the TOML properties from the given
InputStream . |
TomlPropertiesBuilder(InputStream aInputStream,
char... aDelimiters) |
Reads the TOML properties from the given
InputStream . |
TomlPropertiesBuilder(Class<?> aResourceClass,
String aFilePath) |
Loads the TOML properties from the given file's path.
|
TomlPropertiesBuilder(Class<?> aResourceClass,
String aFilePath,
char... aDelimiters) |
Loads the TOML properties from the given file's path.
|
TomlPropertiesBuilder(Class<?> aResourceClass,
String aFilePath,
org.refcodes.runtime.ConfigLocator aConfigLocator) |
Loads the TOML properties from the given file's path.
|
TomlPropertiesBuilder(Class<?> aResourceClass,
String aFilePath,
org.refcodes.runtime.ConfigLocator aConfigLocator,
char... aDelimiters) |
Loads the TOML properties from the given file's path.
|
TomlPropertiesBuilder(Object aObj) |
Create a
TomlPropertiesBuilder instance containing the elements
as of PathMap.MutablePathMap.insert(Object) using the default path
delimiter "/" (Delimiter.PATH ) for the path declarations:
"Inspects the given object and adds all elements found in the given
object. |
TomlPropertiesBuilder(String aFilePath) |
Loads the TOML properties from the given file's path.
|
TomlPropertiesBuilder(String aFilePath,
char... aDelimiters) |
Loads the TOML properties from the given file's path.
|
TomlPropertiesBuilder(String aFilePath,
org.refcodes.runtime.ConfigLocator aConfigLocator) |
Loads the TOML properties from the given file's path.
|
TomlPropertiesBuilder(String aFilePath,
org.refcodes.runtime.ConfigLocator aConfigLocator,
char... aDelimiters) |
Loads the TOML properties from the given file's path.
|
TomlPropertiesBuilder(URL aUrl) |
Loads the TOML properties from the given
URL . |
TomlPropertiesBuilder(URL aUrl,
char... aDelimiters) |
Loads the TOML properties from the given
URL . |
TomlPropertiesBuilder(Map<?,?> aProperties) |
Create a
TomlPropertiesBuilder instance containing the elements
of the provided Map instance using the default path delimiter "/"
(Delimiter.PATH ) for the path declarations |
TomlPropertiesBuilder(Properties aProperties) |
Create a
TomlPropertiesBuilder instance containing the elements
of the provided Properties instance using the default path
delimiter "/" (Delimiter.PATH ) for the path declarations |
TomlPropertiesBuilder(Properties.PropertiesBuilder aProperties) |
Create a
TomlPropertiesBuilder instance containing the elements
of the provided Properties.PropertiesBuilder instance using the default path
delimiter "/" (Delimiter.PATH ) for the path declarations |
Modifier and Type | Method | Description |
---|---|---|
Properties |
loadFrom(File aFile) |
Loads the properties from the given
File . |
Properties |
loadFrom(InputStream aInputStream) |
Loads the properties from the given
InputStream . |
Properties |
loadFrom(InputStream aInputStream,
char... aDelimiters) |
Loads the properties from the given
InputStream . |
void |
parseFrom(String aSerialized) |
Inspects the given serialized representation and adds all declared
elements found.
|
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. |
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
ConfigLocator (if not provided, then
ConfigLocator.ALL is assumed). |
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
ConfigLocator (if not provided, then
ConfigLocator.ALL is assumed). |
equals, hashCode, toString
flush, isFlushable, loadFrom, postProcessAttributes, reload, reload, saveTo, seekFrom
toInstance, toInstance, toType, toType
withInsert, withInsert, withInsertFrom, withInsertTo
insert, insert, insertFrom, insertTo, putAll, toDump, toSourceCode, toSourceCode
withFlush, withFlushUnchecked
clear, clone, containsValue, entrySet, forEach, isEmpty, keySet, putAll, replaceAll, size, values
finalize, getClass, notify, notifyAll, wait, wait, wait
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
withInsert, withInsert, withInsertFrom, withInsertTo
compute, computeIfAbsent, computeIfPresent, containsKey, get, getDelimiter, getOrDefault, getType, merge, put, putIfAbsent, remove, remove, replace, replace, toDataStructure
getDelimiter, getType, toMap, toProperties, toPropertyPath
containsValue, delete, delete, insert, insert, insertFrom, insertTo, put, putAll, putAll, putAll
childrenOf, retrieve, retrieveFrom, retrieveTo, withInsert, withInsert, withInsertFrom, withInsertTo
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
withPut
put, put, putBoolean, putBoolean, putByte, putByte, putDouble, putDouble, putFloat, putFloat, putInteger, putInteger, putLong, putLong, putShort, putShort
childrenOf, retrieveFrom, retrieveTo
reload, reload
fileTo, fileTo, fileTo, fileTo, fileTo, fileTo, fileTo, fileTo, flush, loadFrom, loadFrom, loadFrom, loadFrom, loadFrom, loadFrom, loadFrom, parseFrom, saveTo, saveTo, saveTo, saveTo, saveTo, saveTo, saveTo, saveTo, saveTo, saveTo, saveTo, seekFrom, seekFrom, seekFrom, seekFrom, seekFrom, seekFrom, seekFrom, toSerialized, toSerialized
withInsert, withInsert, withInsertFrom, withInsertTo, withLoadFrom, withLoadFrom, withLoadFrom, withLoadFrom, withLoadFrom, withLoadFrom, withLoadFrom, withLoadFrom, withLoadFrom, withLoadFrom, withPut, withPut, withPutBoolean, withPutByte, withPutDouble, withPutFloat, withPutInteger, withPutLong, withPutShort, withRemoveFrom, withSeekFrom, withSeekFrom, withSeekFrom, withSeekFrom, withSeekFrom, withSeekFrom, withSeekFrom
public static final char SECTION_BEGIN
public static final char SECTION_END
public static final char[] COMMENTS
public static final char[] DELIMITERS
public TomlPropertiesBuilder()
TomlPropertiesBuilder
instance using the default
path delimiter "/" (Delimiter.PATH
) for the path declarations.public TomlPropertiesBuilder(Object aObj)
TomlPropertiesBuilder
instance containing the elements
as of PathMap.MutablePathMap.insert(Object)
using the default path
delimiter "/" (Delimiter.PATH
) for the path declarations:
"Inspects the given object and adds all elements found in the given
object. Elements of type 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). In
case of reflection, the path for each member is appended with its
according mamber's name. All elements (e.g. the members and values) are
inspected recursively which results in the according paths of the
terminating values."aObj
- The object from which the elements are to be added.public TomlPropertiesBuilder(Properties aProperties)
TomlPropertiesBuilder
instance containing the elements
of the provided Properties
instance using the default path
delimiter "/" (Delimiter.PATH
) for the path declarationsaProperties
- the properties to be added.public TomlPropertiesBuilder(Properties.PropertiesBuilder aProperties)
TomlPropertiesBuilder
instance containing the elements
of the provided Properties.PropertiesBuilder
instance using the default path
delimiter "/" (Delimiter.PATH
) for the path declarationsaProperties
- the properties to be added.public TomlPropertiesBuilder(Map<?,?> aProperties)
TomlPropertiesBuilder
instance containing the elements
of the provided Map
instance using the default path delimiter "/"
(Delimiter.PATH
) for the path declarationsaProperties
- the properties to be added.public TomlPropertiesBuilder(File aFile) throws IOException, ParseException
File
.aFile
- The File
from which to load the properties.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.public TomlPropertiesBuilder(File aFile, char... aDelimiters) throws IOException, ParseException
File
.aFile
- The File
from which to load the properties.aDelimiters
- The path delimiters to be used when parsing the
source's properties.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.public TomlPropertiesBuilder(File aFile, org.refcodes.runtime.ConfigLocator aConfigLocator) throws IOException, ParseException
File
.
A provided ConfigLocator
describes the locations to additional
crawl for the desired file.aFile
- The File
from which to load the properties.aConfigLocator
- The ConfigLocator
describes the locations
to additional crawl for the desired file.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.public TomlPropertiesBuilder(File aFile, org.refcodes.runtime.ConfigLocator aConfigLocator, char... aDelimiters) throws IOException, ParseException
File
.
A provided ConfigLocator
describes the locations to additional
crawl for the desired file.aFile
- The File
from which to load the properties.aConfigLocator
- The ConfigLocator
describes the locations
to additional crawl for the desired file.aDelimiters
- The path delimiters to be used when parsing the
source's properties.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.public TomlPropertiesBuilder(String aFilePath) throws IOException, ParseException
aFilePath
- The path to the file from which to load the properties.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.public TomlPropertiesBuilder(String aFilePath, char... aDelimiters) throws IOException, ParseException
aFilePath
- The path to the file from which to load the properties.aDelimiters
- The path delimiters to be used when parsing the
source's properties.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.public TomlPropertiesBuilder(Class<?> aResourceClass, String aFilePath) throws IOException, ParseException
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.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.public TomlPropertiesBuilder(Class<?> aResourceClass, String aFilePath, char... aDelimiters) throws IOException, ParseException
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.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.public TomlPropertiesBuilder(String aFilePath, org.refcodes.runtime.ConfigLocator aConfigLocator) throws IOException, ParseException
ConfigLocator
describes the locations to additional
crawl for the desired file.aFilePath
- The path to the file from which to load the properties.aConfigLocator
- The ConfigLocator
describes the locations
to additional crawl for the desired file.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.public TomlPropertiesBuilder(String aFilePath, org.refcodes.runtime.ConfigLocator aConfigLocator, char... aDelimiters) throws IOException, ParseException
ConfigLocator
describes the locations to additional
crawl for the desired file.aFilePath
- The path to the file from which to load the properties.aConfigLocator
- The ConfigLocator
describes the locations
to additional crawl for the desired file.aDelimiters
- The path delimiters to be used when parsing the
source's properties.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.public TomlPropertiesBuilder(Class<?> aResourceClass, String aFilePath, org.refcodes.runtime.ConfigLocator aConfigLocator) throws IOException, ParseException
ConfigLocator
describes the locations to additional
crawl for the desired file.
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).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.aConfigLocator
- The ConfigLocator
describes the locations
to additional crawl for the desired file.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.public TomlPropertiesBuilder(Class<?> aResourceClass, String aFilePath, org.refcodes.runtime.ConfigLocator aConfigLocator, char... aDelimiters) throws IOException, ParseException
ConfigLocator
describes the locations to additional
crawl for the desired file.
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). *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.aConfigLocator
- The ConfigLocator
describes the locations
to additional crawl for the desired file.aDelimiters
- The path delimiters to be used when parsing the
source's properties.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.public TomlPropertiesBuilder(URL aUrl) throws IOException, ParseException
URL
.aUrl
- The URL
from which to read the properties.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.public TomlPropertiesBuilder(URL aUrl, char... aDelimiters) throws IOException, ParseException
URL
.aUrl
- The URL
from which to read the properties.aDelimiters
- The path delimiters to be used when parsing the
source's properties.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.public TomlPropertiesBuilder(InputStream aInputStream) throws IOException, ParseException
InputStream
.aInputStream
- The InputStream
from which to read the
properties.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.public TomlPropertiesBuilder(InputStream aInputStream, char... aDelimiters) throws IOException, ParseException
InputStream
.aInputStream
- The InputStream
from which to read the
properties.aDelimiters
- The path delimiters to be used when parsing the
source's properties.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.public Properties loadFrom(File aFile) throws IOException, ParseException
File
. Save them using the
method ResourceProperties.MutableResoureProperties.saveTo(File)
.
The default implementation uses the hook method
ResourceProperties.MutableResoureProperties.loadFrom(InputStream, char...)
to finally load and parse the
properties.loadFrom
in interface ResourceProperties.MutableResoureProperties
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.public Properties loadFrom(InputStream aInputStream) throws IOException, ParseException
InputStream
. Save them
using the method ResourceProperties.MutableResoureProperties.saveTo(OutputStream)
.
The default implementation uses the hook method
ResourceProperties.MutableResoureProperties.loadFrom(InputStream, char...)
to finally load and parse the
properties.loadFrom
in interface ResourceProperties.MutableResoureProperties
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.public 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
ResourceProperties.MutableResoureProperties.loadFrom(InputStream, char...)
to finally load and parse the
properties.parseFrom
in interface ResourceProperties.MutableResoureProperties
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.public Properties seekFrom(String aFilePath) throws IOException, ParseException
ConfigLocator
(if not provided, then
ConfigLocator.ALL
is assumed).
The default implementation uses the hook method
ResourceProperties.MutableResoureProperties.loadFrom(InputStream, char...)
to finally load and parse the
properties.seekFrom
in interface ResourceProperties.MutableResoureProperties
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.public Properties seekFrom(Class<?> aResourceClass, String aFilePath) throws IOException, ParseException
ConfigLocator
(if not provided, then
ConfigLocator.ALL
is assumed). 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
ResourceProperties.MutableResoureProperties.loadFrom(InputStream, char...)
to finally load and parse the
properties.seekFrom
in interface ResourceProperties.MutableResoureProperties
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.public Properties loadFrom(InputStream aInputStream, char... aDelimiters) throws IOException, ParseException
InputStream
. Save them
using the method ResourceProperties.MutableResoureProperties.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.loadFrom
in interface ResourceProperties.MutableResoureProperties
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.public void saveTo(OutputStream aOutputStream, String aComment, char aDelimiter) throws IOException
OutputStream
using the
provided delimiter as the destination's path delimiter. Load them via
ResourceProperties.MutableResoureProperties.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.saveTo
in interface ResourceProperties.MutableResoureProperties
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 failedCopyright © 2018. All rights reserved.