/** * Reads a properties file and stores its internal structure. The found * properties will be added to the associated configuration object. * * @param in the reader to the properties file * @throws java.io.IOException if an error occurs */ protected void loadLayout(Reader in) throws IOException { PropertiesReader reader = new PropertiesReader(in); while (reader.nextProperty()) { storage.put(reader.getPropertyName(), reader.getPropertyValue()); int idx = checkHeaderComment(reader.getCommentLines()); layout.put(reader.getPropertyName(), new Layout(idx < reader.getCommentLines().size() ? new ArrayList<String>(reader.getCommentLines().subList(idx, reader.getCommentLines().size())) : null, new ArrayList<String>(reader.getValueLines()))); } footer = new ArrayList<String>(reader.getCommentLines()); if (substitute) { substitute(); } }
String line = readLine(); if (line == null) boolean combine = checkCombineLines(line); if (combine)
String line = readLine(); if (line == null) if (checkCombineLines(line))
String line = readLine(); if (line == null) boolean combine = checkCombineLines(line); if (combine)
String line = readLine(); if (line == null) boolean combine = checkCombineLines(line); if (combine)
PropertiesReader reader = new PropertiesReader(in, maybeTyped); boolean hasProperty = false; while (reader.nextProperty()) storage.put(reader.getPropertyName(), reader.getPropertyValue()); int idx = checkHeaderComment(reader.getCommentLines()); layout.put(reader.getPropertyName(), new Layout(idx < reader.getCommentLines().size() ? new ArrayList<String>(reader.getCommentLines().subList(idx, reader.getCommentLines().size())) : null, new ArrayList<String>(reader.getValueLines()))); footer = new ArrayList<String>(reader.getCommentLines()); } else { header = new ArrayList<String>(reader.getCommentLines());
String line = readProperty(); String[] property = parseProperty(line); boolean typed = false; if (maybeTyped && property[1].length() >= 2) {
String line = readProperty(); String[] property = parseProperty(line); boolean typed = false; if (maybeTyped && property[1].length() >= 2) {
PropertiesReader reader = new PropertiesReader(in, maybeTyped); boolean hasProperty = false; while (reader.nextProperty()) storage.put(reader.getPropertyName(), reader.getPropertyValue()); int idx = checkHeaderComment(reader.getCommentLines()); layout.put(reader.getPropertyName(), new Layout(idx < reader.getCommentLines().size() ? new ArrayList<String>(reader.getCommentLines().subList(idx, reader.getCommentLines().size())) : null, new ArrayList<String>(reader.getValueLines()))); footer = new ArrayList<String>(reader.getCommentLines()); } else { header = new ArrayList<String>(reader.getCommentLines());
PropertiesReader reader = new PropertiesReader(in, maybeTyped); boolean hasProperty = false; while (reader.nextProperty()) storage.put(reader.getPropertyName(), reader.getPropertyValue()); int idx = checkHeaderComment(reader.getCommentLines()); layout.put(reader.getPropertyName(), new Layout(idx < reader.getCommentLines().size() ? new ArrayList<String>(reader.getCommentLines().subList(idx, reader.getCommentLines().size())) : null, new ArrayList<String>(reader.getValueLines()))); footer = new ArrayList<String>(reader.getCommentLines()); } else { header = new ArrayList<String>(reader.getCommentLines());
String line = readProperty(); String[] property = parseProperty(line); boolean typed = false; if (maybeTyped && property[1].length() >= 2) {
/** * Parses the next property from the input stream and stores the found * name and value in internal fields. These fields can be obtained using * the provided getter methods. The return value indicates whether EOF * was reached (<b>false</b>) or whether further properties are * available (<b>true</b>). * * @return a flag if further properties are available * @throws java.io.IOException if an error occurs */ public boolean nextProperty() throws IOException { String line = readProperty(); if (line == null) { return false; // EOF } // parse the line String[] property = parseProperty(line); propertyName = unescapeJava(property[0]); propertyValue = unescapeJava(property[1]); return true; }