Package io.quarkus.bootstrap.util
Class PropertyUtils
java.lang.Object
io.quarkus.bootstrap.util.PropertyUtils
- Author:
- Alexey Loubyansky
-
Method Summary
Modifier and TypeMethodDescriptionstatic final booleangetBoolean(String name, boolean notFoundValue) static final BooleangetBooleanOrNull(String name) static StringgetProperty(String name) static StringgetProperty(String name, String defValue) static Stringstatic booleanstatic voidWrites a config option with its value to the target writer, possibly applying some transformations, such as character escaping prior to writing.static voidStores a map of strings into a file sorting the keys alphabetically and followingProperties.store(Writer, String)format but skipping the timestamp and comments.static voidStores a map of strings into a file sorting the keys alphabetically and followingProperties.store(Writer, String)format but skipping the timestamp and comments.static voidstore(Properties properties, Writer writer) Stores properties into a file sorting the keys alphabetically and followingProperties.store(Writer, String)format but skipping the timestamp and comments.static voidstore(Properties properties, Writer writer, String leadingComment) Stores properties into a file sorting the keys alphabetically and followingProperties.store(Writer, String)format but skipping the timestamp and comments.static voidstore(Properties properties, Path file) Stores properties into a file sorting the keys alphabetically and followingProperties.store(Writer, String)format but skipping the timestamp and comments.static voidstore(Properties properties, Path file, String leadingComment) Stores properties into a file sorting the keys alphabetically and followingProperties.store(Writer, String)format but skipping the timestamp and comments.
-
Method Details
-
isWindows
public static boolean isWindows() -
getUserHome
-
getProperty
-
getProperty
-
getBooleanOrNull
-
getBoolean
-
store
public static void store(Properties properties, Path file, String leadingComment) throws IOException Stores properties into a file sorting the keys alphabetically and followingProperties.store(Writer, String)format but skipping the timestamp and comments.- Parameters:
properties- properties to storeleadingComment- a leading comment, it will be prepended by an hashfile- target file- Throws:
IOException- in case of a failure
-
store
public static void store(Properties properties, Writer writer, String leadingComment) throws IOException Stores properties into a file sorting the keys alphabetically and followingProperties.store(Writer, String)format but skipping the timestamp and comments.- Parameters:
properties- properties to storeleadingComment- a leading comment, it will be prepended by an hashwriter- target writer- Throws:
IOException- in case of a failure
-
store
public static void store(Map<String, String> properties, Path file, String leadingComment) throws IOExceptionStores a map of strings into a file sorting the keys alphabetically and followingProperties.store(Writer, String)format but skipping the timestamp and comments.- Parameters:
properties- properties to storefile- target file- Throws:
IOException- in case of a failure
-
store
Stores properties into a file sorting the keys alphabetically and followingProperties.store(Writer, String)format but skipping the timestamp and comments.- Parameters:
properties- properties to storefile- target file- Throws:
IOException- in case of a failure
-
store
Stores properties into a file sorting the keys alphabetically and followingProperties.store(Writer, String)format but skipping the timestamp and comments.- Parameters:
properties- properties to storewriter- target writer- Throws:
IOException- in case of a failure
-
store
Stores a map of strings into a file sorting the keys alphabetically and followingProperties.store(Writer, String)format but skipping the timestamp and comments.- Parameters:
properties- properties to storefile- target file- Throws:
IOException- in case of a failure
-
store
Writes a config option with its value to the target writer, possibly applying some transformations, such as character escaping prior to writing.- Parameters:
writer- target writername- option namevalue- option value- Throws:
IOException- in case of a failure
-