Package com.helger.commons.lang
Class PropertiesHelper
java.lang.Object
com.helger.commons.lang.PropertiesHelper
Helper class to ease the use of
Properties class.- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringexpandProperties(String sValue, UnaryOperator<String> aValueProvider) Special version ofexpandSystemProperties(String)that takes an arbitrary value provider and is not limited to system properties.static StringexpandSystemProperties(String sValue) Copy of Oracle internal PropertyExpander.expand methodstatic ICommonsMap<String, String> getAsStringMap(Properties aProps) static NonBlockingPropertiesstatic NonBlockingPropertiesloadProperties(IReadableResource aRes, Charset aCharset) static NonBlockingPropertiesloadProperties(ISimpleURL aURL) static NonBlockingPropertiesloadProperties(File aFile) static NonBlockingPropertiesloadProperties(File aFile, Charset aCharset) static NonBlockingPropertiesstatic NonBlockingPropertiesloadProperties(Reader aReader)
-
Method Details
-
getAsStringMap
@Nonnull @ReturnsMutableCopy public static ICommonsMap<String,String> getAsStringMap(@Nonnull Properties aProps) -
loadProperties
-
loadProperties
-
loadProperties
-
loadProperties
-
loadProperties
@Nullable public static NonBlockingProperties loadProperties(@Nonnull IReadableResource aRes, @Nonnull Charset aCharset) -
loadProperties
-
loadProperties
-
expandSystemProperties
Copy of Oracle internal PropertyExpander.expand method- Parameters:
sValue- Source value. May benull.- Returns:
nullif source isnull.- See Also:
-
expandProperties
@Nullable public static String expandProperties(@Nullable String sValue, @Nonnull UnaryOperator<String> aValueProvider) Special version ofexpandSystemProperties(String)that takes an arbitrary value provider and is not limited to system properties.- Parameters:
sValue- Source value. May benull.aValueProvider- The value provider to be used. May not benull.- Returns:
nullif the source value isnull.- Since:
- 9.1.2
-