Package com.helger.io.rt
Class PropertiesLoader
java.lang.Object
com.helger.io.rt.PropertiesLoader
Helper class to ease the use of
Properties class.- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable com.helger.base.rt.NonBlockingPropertiesloadProperties(@NonNull IReadableResource aRes) Load properties from the given readable resource using the default charset.static @Nullable com.helger.base.rt.NonBlockingPropertiesloadProperties(@NonNull IReadableResource aRes, @NonNull Charset aCharset) Load properties from the given readable resource using the specified charset.static @Nullable com.helger.base.rt.NonBlockingPropertiesloadProperties(@NonNull File aFile) Load properties from the given file using the default charset.static @Nullable com.helger.base.rt.NonBlockingPropertiesloadProperties(@NonNull File aFile, @NonNull Charset aCharset) Load properties from the given file using the specified charset.
-
Method Details
-
loadProperties
public static @Nullable com.helger.base.rt.NonBlockingProperties loadProperties(@NonNull File aFile) Load properties from the given file using the default charset.- Parameters:
aFile- The file to load from. May not benull.- Returns:
nullif the file could not be loaded.
-
loadProperties
public static @Nullable com.helger.base.rt.NonBlockingProperties loadProperties(@NonNull File aFile, @NonNull Charset aCharset) Load properties from the given file using the specified charset.- Parameters:
aFile- The file to load from. May not benull.aCharset- The charset to use. May not benull.- Returns:
nullif the file could not be loaded.
-
loadProperties
public static @Nullable com.helger.base.rt.NonBlockingProperties loadProperties(@NonNull IReadableResource aRes) Load properties from the given readable resource using the default charset.- Parameters:
aRes- The resource to load from. May not benull.- Returns:
nullif the resource could not be loaded.
-
loadProperties
public static @Nullable com.helger.base.rt.NonBlockingProperties loadProperties(@NonNull IReadableResource aRes, @NonNull Charset aCharset) Load properties from the given readable resource using the specified charset.- Parameters:
aRes- The resource to load from. May not benull.aCharset- The charset to use. May not benull.- Returns:
nullif the resource could not be loaded.
-