Package jodd.props
Class PropertiesToProps
java.lang.Object
jodd.props.PropertiesToProps
Converter for Java Properties to Jodd Props format.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidconvertToWriter(Writer writer, Properties properties, Map<String, Properties> profiles) Convert Java Properties to Jodd Props formatprivate BufferedWritergetBufferedWriter(Writer writer) private voidwriteBaseAndProfileProperties(BufferedWriter bw, Properties baseProperties, Map<String, Properties> profiles) private voidwriteBaseProperty(BufferedWriter bw, String key, String value) private voidwriteProfilePropertiesOfKey(BufferedWriter bw, String key, Map<String, Properties> profiles) private voidwriteProfilePropertiesThatAreNotInTheBase(BufferedWriter bw, Properties baseProperties, Map<String, Properties> profiles) private voidwriteProfileProperty(BufferedWriter bw, String profileName, String key, String value)
-
Constructor Details
-
PropertiesToProps
PropertiesToProps()
-
-
Method Details
-
convertToWriter
void convertToWriter(Writer writer, Properties properties, Map<String, Properties> profiles) throws IOExceptionConvert Java Properties to Jodd Props format- Parameters:
writer- Writer to write Props formatted file content toproperties- Properties to convert to Props formatprofiles- Properties per profile to convert and add to the Props format- Throws:
IOException- On any I/O error when writing to the writer
-
writeProfilePropertiesThatAreNotInTheBase
private void writeProfilePropertiesThatAreNotInTheBase(BufferedWriter bw, Properties baseProperties, Map<String, Properties> profiles) throws IOException- Throws:
IOException
-
getBufferedWriter
-
writeBaseAndProfileProperties
private void writeBaseAndProfileProperties(BufferedWriter bw, Properties baseProperties, Map<String, Properties> profiles) throws IOException- Throws:
IOException
-
writeProfilePropertiesOfKey
private void writeProfilePropertiesOfKey(BufferedWriter bw, String key, Map<String, Properties> profiles) throws IOException- Throws:
IOException
-
writeProfileProperty
private void writeProfileProperty(BufferedWriter bw, String profileName, String key, String value) throws IOException - Throws:
IOException
-
writeBaseProperty
- Throws:
IOException
-