Here you can find the source of loadUTF8LinesFromFile(File file)
public static List<String> loadUTF8LinesFromFile(File file) throws IOException
//package com.java2s; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { public static List<String> loadUTF8LinesFromFile(File file) throws IOException { InputStream is = new FileInputStream(file); Scanner scanner = new Scanner(is, "UTF-8"); List<String> r = new ArrayList<String>(); while (scanner.hasNextLine()) r.add(scanner.nextLine());/*ww w.j a v a2 s .c o m*/ is.close(); return r; } }