@Test public void testReadAllLines() throws IOException { PrintWriter pr = new PrintWriter(new File("target/filereadtest.txt")); pr.append("this is a test\nthis is a test"); pr.close(); List<String> lines = MiscUtils.readAllLines(new File("target/filereadtest.txt")); for (String line : lines) { assertEquals("this is a test", line); } }
public static List<String> readAllLines(File file) throws IOException { BufferedReader reader = new BufferedReader(new FileReader(file)); List<String> lines = new ArrayList<>(); String temp = null; while ((temp = reader.readLine()) != null) { lines.add(temp); } reader.close(); return lines; }
MiscUtils { public static List<String> readAllLines(File file) throws IOException { BufferedReader reader = new BufferedReader(new FileReader(file)); List<String> lines = new ArrayList<>(); String temp = null; while ((temp = reader.readLine()) != null) { lines.add(temp); } reader.close(); return lines; } }
MiscUtils { public static List<String> readAllLines(File file) throws IOException { BufferedReader reader = new BufferedReader(new FileReader(file)); List<String> lines = new ArrayList<>(); String temp = null; while ((temp = reader.readLine()) != null) { lines.add(temp); } reader.close(); return lines; } private  MiscUtils(); }
MiscUtils { public static List<String> readAllLines(File file) throws IOException { BufferedReader reader = new BufferedReader(new FileReader(file)); List<String> lines = new ArrayList<>(); String temp = null; while ((temp = reader.readLine()) != null) { lines.add(temp); } reader.close(); return lines; } private  MiscUtils(); static long bucketCounter(Series series); static String[] splitAndNormalizeString(String input); static List<String> readAllLines(File file); static DataPoint buildDataPoint(long timestamp, long value); static DataPoint buildDataPoint(long timestamp, double value); static void ls(File file); static boolean delete(File file); static String tagsToString(List<Tag> tags); static String tagToString(List<String> tags); static TagFilter buildTagFilter(String tagFilter); static SimpleTagFilter buildSimpleFilter(String item); static FunctionIteratorFactory createIteratorChain(String[] parts, int startIndex); static Function createFunctionChain(String[] parts, int startIndex); static TargetSeries extractTargetFromQuery(String query); static Point buildDP(String dbName, String measurementName, List<String> valueFieldName, List<Tag> tags,
			long timestamp, List<Long> value, List<Boolean> fp); static String printBuffer(ByteBuffer buffer, int counter); static void writeStringToBuffer(String str, ByteBuffer buf); static void writeByteStringToBuffer(byte[] str, ByteBuffer buf); static ByteString getByteStringFromBuffer(ByteBuffer buf); static String getStringFromBuffer(ByteBuffer buf); static Point buildDataPoint(String dbName, String measurementName, List<String> valueFieldName,
			List<Tag> taglist, long timestamp, List<Long> values, List<Boolean> fp); static Point buildDataPoint(String dbName, String measurementName, String valueFieldName, List<Tag> taglist,
			long timestamp, long value); static Point buildDataPoint(String dbName, String measurementName, String valueFieldName, List<Tag> taglist,
			long timestamp, double value); static int tagHashCode(List<Tag> tags); }
MiscUtils { public static List<String> readAllLines(File file) throws IOException { BufferedReader reader = new BufferedReader(new FileReader(file)); List<String> lines = new ArrayList<>(); String temp = null; while ((temp = reader.readLine()) != null) { lines.add(temp); } reader.close(); return lines; } private  MiscUtils(); static long bucketCounter(Series series); static String[] splitAndNormalizeString(String input); static List<String> readAllLines(File file); static DataPoint buildDataPoint(long timestamp, long value); static DataPoint buildDataPoint(long timestamp, double value); static void ls(File file); static boolean delete(File file); static String tagsToString(List<Tag> tags); static String tagToString(List<String> tags); static TagFilter buildTagFilter(String tagFilter); static SimpleTagFilter buildSimpleFilter(String item); static FunctionIteratorFactory createIteratorChain(String[] parts, int startIndex); static Function createFunctionChain(String[] parts, int startIndex); static TargetSeries extractTargetFromQuery(String query); static Point buildDP(String dbName, String measurementName, List<String> valueFieldName, List<Tag> tags,
			long timestamp, List<Long> value, List<Boolean> fp); static String printBuffer(ByteBuffer buffer, int counter); static void writeStringToBuffer(String str, ByteBuffer buf); static void writeByteStringToBuffer(byte[] str, ByteBuffer buf); static ByteString getByteStringFromBuffer(ByteBuffer buf); static String getStringFromBuffer(ByteBuffer buf); static Point buildDataPoint(String dbName, String measurementName, List<String> valueFieldName,
			List<Tag> taglist, long timestamp, List<Long> values, List<Boolean> fp); static Point buildDataPoint(String dbName, String measurementName, String valueFieldName, List<Tag> taglist,
			long timestamp, long value); static Point buildDataPoint(String dbName, String measurementName, String valueFieldName, List<Tag> taglist,
			long timestamp, double value); static int tagHashCode(List<Tag> tags);  }