Package com.helger.commons.lang
Class PropertiesHelper
- java.lang.Object
-
- com.helger.commons.lang.PropertiesHelper
-
@Immutable public final class PropertiesHelper extends Object
Helper class to ease the use ofPropertiesclass.- Author:
- Philip Helger
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 NonBlockingPropertiesloadProperties(IReadableResource aRes)static NonBlockingPropertiesloadProperties(IReadableResource aRes, Charset aCharset)static NonBlockingPropertiesloadProperties(ISimpleURL aURL)static NonBlockingPropertiesloadProperties(File aFile)static NonBlockingPropertiesloadProperties(File aFile, Charset aCharset)static NonBlockingPropertiesloadProperties(InputStream aIS)static NonBlockingPropertiesloadProperties(Reader aReader)
-
-
-
Method Detail
-
getAsStringMap
@Nonnull @ReturnsMutableCopy public static ICommonsMap<String,String> getAsStringMap(@Nonnull Properties aProps)
-
loadProperties
@Nullable public static NonBlockingProperties loadProperties(@Nonnull ISimpleURL aURL)
-
loadProperties
@Nullable public static NonBlockingProperties loadProperties(@Nonnull File aFile)
-
loadProperties
@Nullable public static NonBlockingProperties loadProperties(@Nonnull File aFile, @Nonnull Charset aCharset)
-
loadProperties
@Nullable public static NonBlockingProperties loadProperties(@Nonnull IReadableResource aRes)
-
loadProperties
@Nullable public static NonBlockingProperties loadProperties(@Nonnull IReadableResource aRes, @Nonnull Charset aCharset)
-
loadProperties
@Nullable public static NonBlockingProperties loadProperties(@Nonnull @WillClose InputStream aIS)
-
loadProperties
@Nullable public static NonBlockingProperties loadProperties(@Nonnull @WillClose Reader aReader)
-
expandSystemProperties
@Nullable public static String expandSystemProperties(@Nullable String sValue)
Copy of Oracle internal PropertyExpander.expand method- Parameters:
sValue- Source value. May benull.- Returns:
nullif source isnull.- See Also:
expandProperties(String, UnaryOperator)
-
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
-
-