public class PrettyProperties extends Properties implements Cloneable
Modifier and Type | Class and Description |
---|---|
protected static class |
PrettyProperties.NameValue |
Modifier and Type | Field and Description |
---|---|
protected static String |
COMMENT_CHAR1 |
protected static String |
COMMENT_CHAR2 |
protected static boolean |
DEBUG |
protected static String |
DELIMINATOR |
protected HashMap<String,Integer> |
m_lineInSource |
protected ArrayList<String> |
m_sourceDataList |
protected static String |
NEWLINE |
protected static String |
OS_PROP |
protected boolean |
specialCharsEscape |
protected static String |
specialSaveChars |
protected static String |
UNIXNEWLINE |
protected static String |
WINDOWS_DETECT |
protected static String |
WINDOWSNEWLINE |
defaults
Constructor and Description |
---|
PrettyProperties() |
PrettyProperties(Properties defaults) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
static PrettyProperties |
copy(Properties src) |
protected static boolean |
isCommentLine(String line)
Determine if the given line is a comment line
|
void |
load(InputStream in)
We override the load function so that we read in comment lines and preserve the
original order of the items in the properties file
|
void |
load(Reader reader) |
protected PrettyProperties.NameValue |
parseLine(String line) |
Object |
put(Object key,
Object value) |
void |
putAll(Map<? extends Object,? extends Object> t) |
Object |
remove(Object key) |
void |
save(OutputStream out,
String header) |
protected String |
saveConvert(String theString,
boolean escapeSpace) |
void |
store(Writer writer,
String comments) |
getProperty, getProperty, list, list, loadFromXML, propertyNames, setProperty, store, storeToXML, storeToXML, stringPropertyNames
clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keys, keySet, merge, putIfAbsent, rehash, remove, replace, replace, replaceAll, size, toString, values
protected boolean specialCharsEscape
protected static boolean DEBUG
protected static String OS_PROP
protected static String WINDOWS_DETECT
protected static final String COMMENT_CHAR1
protected static final String COMMENT_CHAR2
protected static final String DELIMINATOR
protected static final String UNIXNEWLINE
protected static final String WINDOWSNEWLINE
protected static String NEWLINE
protected static final String specialSaveChars
public PrettyProperties()
public PrettyProperties(Properties defaults)
public static PrettyProperties copy(Properties src)
public void load(InputStream in) throws IOException
load
in class Properties
IOException
public void load(Reader reader) throws IOException
load
in class Properties
IOException
public void clear()
public void save(OutputStream out, String header)
save
in class Properties
public void store(Writer writer, String comments) throws IOException
store
in class Properties
IOException
protected static boolean isCommentLine(String line)
protected PrettyProperties.NameValue parseLine(String line)