String loadPath = line.substring(LOAD_PREFIX.length()).trim(); loadPath = assignProperties(loadPath); loadFilteredPath(loadPath); } else if (line.startsWith(GRAB_PREFIX)) { String grabParams = line.substring(GRAB_PREFIX.length()).trim();
/** * configures this loader with a stream * * @param is stream used to read the configuration * @throws IOException if reading or parsing the contents of the stream fails */ public void configure(InputStream is) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(is)); int lineNumber = 0; while (true) { String line = reader.readLine(); if (line == null) break; line = line.trim(); lineNumber++; if (line.startsWith("#") || line.length() == 0) continue; if (line.startsWith(LOAD_PREFIX)) { String loadPath = line.substring(LOAD_PREFIX.length()).trim(); loadPath = assignProperties(loadPath); loadFilteredPath(loadPath); } else if (line.startsWith(MAIN_PREFIX)) { if (main != null) throw new IOException("duplicate definition of main in line " + lineNumber + " : " + line); main = line.substring(MAIN_PREFIX.length()).trim(); } else { throw new IOException("unexpected line in " + lineNumber + " : " + line); } } if (requireMain && main == null) throw new IOException("missing main class definition in config file"); }
/** * configures this loader with a stream * * @param is stream used to read the configuration * @throws IOException if reading or parsing the contents of the stream fails */ public void configure(InputStream is) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(is)); int lineNumber = 0; while (true) { String line = reader.readLine(); if (line == null) break; line = line.trim(); lineNumber++; if (line.startsWith("#") || line.length() == 0) continue; if (line.startsWith(LOAD_PREFIX)) { String loadPath = line.substring(LOAD_PREFIX.length()).trim(); loadPath = assignProperties(loadPath); loadFilteredPath(loadPath); } else if (line.startsWith(MAIN_PREFIX)) { if (main != null) throw new IOException("duplicate definition of main in line " + lineNumber + " : " + line); main = line.substring(MAIN_PREFIX.length()).trim(); } else { throw new IOException("unexpected line in " + lineNumber + " : " + line); } } if (requireMain && main == null) throw new IOException("missing main class definition in config file"); }
/** * configures this loader with a stream * * @param is stream used to read the configuration * @throws IOException if reading or parsing the contents of the stream fails */ public void configure(InputStream is) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(is)); int lineNumber = 0; while (true) { String line = reader.readLine(); if (line == null) break; line = line.trim(); lineNumber++; if (line.startsWith("#") || line.length() == 0) continue; if (line.startsWith(LOAD_PREFIX)) { String loadPath = line.substring(LOAD_PREFIX.length()).trim(); loadPath = assignProperties(loadPath); loadFilteredPath(loadPath); } else if (line.startsWith(MAIN_PREFIX)) { if (main != null) throw new IOException("duplicate definition of main in line " + lineNumber + " : " + line); main = line.substring(MAIN_PREFIX.length()).trim(); } else { throw new IOException("unexpected line in " + lineNumber + " : " + line); } } if (requireMain && main == null) throw new IOException("missing main class definition in config file"); }
String loadPath = line.substring(LOAD_PREFIX.length()).trim(); loadPath = assignProperties(loadPath); loadFilteredPath(loadPath); } else if (line.startsWith(MAIN_PREFIX)) { if (main != null)