Package jodd.props
Class PropertiesToProps
- java.lang.Object
-
- jodd.props.PropertiesToProps
-
class PropertiesToProps extends java.lang.ObjectConverter for Java Properties to Jodd Props format.
-
-
Constructor Summary
Constructors Constructor Description PropertiesToProps()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidconvertToWriter(java.io.Writer writer, java.util.Properties properties, java.util.Map<java.lang.String,java.util.Properties> profiles)Convert Java Properties to Jodd Props formatprivate java.io.BufferedWritergetBufferedWriter(java.io.Writer writer)private voidwriteBaseAndProfileProperties(java.io.BufferedWriter bw, java.util.Properties baseProperties, java.util.Map<java.lang.String,java.util.Properties> profiles)private voidwriteBaseProperty(java.io.BufferedWriter bw, java.lang.String key, java.lang.String value)private voidwriteProfilePropertiesOfKey(java.io.BufferedWriter bw, java.lang.String key, java.util.Map<java.lang.String,java.util.Properties> profiles)private voidwriteProfilePropertiesThatAreNotInTheBase(java.io.BufferedWriter bw, java.util.Properties baseProperties, java.util.Map<java.lang.String,java.util.Properties> profiles)private voidwriteProfileProperty(java.io.BufferedWriter bw, java.lang.String profileName, java.lang.String key, java.lang.String value)
-
-
-
Method Detail
-
convertToWriter
void convertToWriter(java.io.Writer writer, java.util.Properties properties, java.util.Map<java.lang.String,java.util.Properties> profiles) throws java.io.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:
java.io.IOException- On any I/O error when writing to the writer
-
writeProfilePropertiesThatAreNotInTheBase
private void writeProfilePropertiesThatAreNotInTheBase(java.io.BufferedWriter bw, java.util.Properties baseProperties, java.util.Map<java.lang.String,java.util.Properties> profiles) throws java.io.IOException- Throws:
java.io.IOException
-
getBufferedWriter
private java.io.BufferedWriter getBufferedWriter(java.io.Writer writer)
-
writeBaseAndProfileProperties
private void writeBaseAndProfileProperties(java.io.BufferedWriter bw, java.util.Properties baseProperties, java.util.Map<java.lang.String,java.util.Properties> profiles) throws java.io.IOException- Throws:
java.io.IOException
-
writeProfilePropertiesOfKey
private void writeProfilePropertiesOfKey(java.io.BufferedWriter bw, java.lang.String key, java.util.Map<java.lang.String,java.util.Properties> profiles) throws java.io.IOException- Throws:
java.io.IOException
-
writeProfileProperty
private void writeProfileProperty(java.io.BufferedWriter bw, java.lang.String profileName, java.lang.String key, java.lang.String value) throws java.io.IOException- Throws:
java.io.IOException
-
writeBaseProperty
private void writeBaseProperty(java.io.BufferedWriter bw, java.lang.String key, java.lang.String value) throws java.io.IOException- Throws:
java.io.IOException
-
-