com.github.ncredinburgh.tomcat.PropertyParser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of secure-tomcat-datasourcefactory Show documentation
Show all versions of secure-tomcat-datasourcefactory Show documentation
A Tomcat DataSourceFactory that supports an encrypted password
package com.github.ncredinburgh.tomcat;
import java.io.IOException;
import java.io.Reader;
import java.io.StringReader;
import java.util.Properties;
public class PropertyParser {
public static Properties parseProperties(String propertyString) {
Properties properties = new Properties();
try {
Reader propertyReader = new StringReader(propertyString.replaceAll(";", "\n"));
properties.load(propertyReader);
} catch (IOException e) {
// Can't happen with StringReader
}
return properties;
}
}