/** * Accesses a resource by name and returns the (non comment) lines * containing data. * * <p> * A comment line is any line that starts with the character "#" * </p> * * @param resource * @return a list of non-blank non-comment lines with whitespace trimmed * from front and back. * @throws IOException */ public List<String> getLines(String resource) throws IOException { return getLines(resource, UTF_8); }
/** * @deprecated Use {@link SolrResourceLoader#getLines(String)} instead. */ @Deprecated public List<String> getLines(String resource) throws IOException { return loader.getLines(resource); }
/** * Accesses a resource by name and returns the (non comment) lines containing * data using the given character encoding. * * <p> * A comment line is any line that starts with the character "#" * </p> * * @param resource the file to be read * @param encoding * @return a list of non-blank non-comment lines with whitespace trimmed * @throws IOException */ public List<String> getLines(String resource, String encoding) throws IOException { return getLines(resource, Charset.forName(encoding)); }
private List<String> readLines(SolrCore core, String fileName) throws IOException { return core.getResourceLoader().getLines(fileName, characterEncoding); }
writer.setMaxBufferedDocs(150); List<String> lines = loader.getLines(sourceLocation, characterEncoding);