Home | History | Annotate | Download | only in data

Lines Matching refs:line

43     String line;
44 while ((line = lineReader.readLine()) != null) {
45 parseLine(line, output, context, lineReader, dataFileName, errorHandler);
49 private void parseLine(String line, Data output, List<String> context,
52 line = stripComment(line);
55 if ((split = split(line, "=")) != null) {
58 } else if ((split = split(line, "<<")) != null) {
64 } else if ((split = split(line, "{")) != null) {
68 } else if (split(line, "}") != null) {
72 } else if ((split = split(line, ":")) != null) {
75 } else if (line.trim().length() != 0) {
78 errorHandler.error(lineReader.getLineNumber(), line, dataFileName, "Bad HDF syntax");
83 private String stripComment(String line) {
84 int commentPosition = line.indexOf('#');
85 int equalsPosition = line.indexOf('=');
87 return line.substring(0, commentPosition);
89 return line;
94 * Reads lines from a reader until a line is encountered that matches token (or end of stream).
98 String line;
99 while ((line = reader.readLine()) != null && !line.trim().equals(token)) {
100 result.append(line).append('\n');
118 * Split a line in two, based on a delimiter. If the delimiter is not found, null is returned.
120 private Split split(String line, String delimiter) {
121 int position = line.indexOf(delimiter);
124 result.left = line.substring(0, position).trim();
125 result.right = line.substring(position + delimiter.length()).trim();