上代码
package ThreadLearning;
import java.io.*;
import java.util.ArrayList;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
/**
* @author kyojurorengoku
* @date 2022/1/20
* @Description
*/
public class LstFileAnalysis {
static String fileUrl = "";
static File file = new File(fileUrl);
static InputStreamReader isr;
static {
try {
isr = new InputStreamReader(new FileInputStream(file));
} catch (FileNotFoundException e) {
e.printStackTrace();
}
}
public static void main(String[] args) throws IOException {
ExecutorService executorService = Executors.newFixedThreadPool(4);
BufferedReader read = new BufferedReader(isr);
String line = "";
long l = System.currentTimeMillis();
while ((line = read.readLine()) != null) {
String[] split = line.split("\s+");
if (split.length == 0) {
break;