/** * Reads all lines from a stream, ignores all comments, and closes the * stream. * * @param stream * the input stream */ public static List<String> readAllLinesAsList(InputStream stream) throws IOException { return readAllLinesAsList(stream, Integer.MAX_VALUE); }
/** * Reads all lines from a stream, ignores all comments, and closes the * stream. * * @param stream * the input stream */ public static List<String> readAllLinesAsList(InputStream stream) throws IOException { return readAllLinesAsList(stream, Integer.MAX_VALUE); }
public void loadGroups(InputStream stream) throws Exception { if (stream == null) { throw new IllegalArgumentException("Stream is null!"); } for (String groupName : IOUtils.readAllLinesAsList(stream, 10000)) { addGroup(groupName); } }