Interface ILcyPropertiesDecoder
- All Known Implementing Classes:
TLcyStringPropertiesCodec
public interface ILcyPropertiesDecoder
Creates new or popuplates existing ALcyProperties from files or other data
sources.
The supported data sources and type of ALcyProperties instances
are defined by the actual implementations of this interface.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanDecodeSource(String aSourceName) Checks whether thisILcyPropertiesDecodercan decode the specified data source.Decodes the given source name into anALcyPropertiesobject.voiddecodeSFCT(String aSourceName, ALcyProperties aPropsSFCT, boolean aOverwrite) Decodes the given source name into a givenALcyPropertiesobject.
-
Method Details
-
canDecodeSource
Checks whether this
ILcyPropertiesDecodercan decode the specified data source.Often this will only be a simple test, for example checking the file extension of a file.
- Parameters:
aSourceName- the data source to be verified; typically a file name or a URL.- Returns:
trueif this decoder can decode the data specified by the source name,falseotherwise.- See Also:
-
decode
Decodes the given source name into an
ALcyPropertiesobject.- Parameters:
aSourceName- The source name to decode from. Must not benull.- Returns:
- The decoded
ALcyProperties. Nevernull. - Throws:
IOException- In case of IO failure.
-
decodeSFCT
void decodeSFCT(String aSourceName, ALcyProperties aPropsSFCT, boolean aOverwrite) throws IOException Decodes the given source name into a given
ALcyPropertiesobject.- Parameters:
aSourceName- The source name to decode from.aPropsSFCT- The properties to load into. Must not benull.aOverwrite-trueto overwrite existing properties if they are also present in the given source.falseto leave existing properties unchanged.- Throws:
IOException- In case of IO failure.
-