package test;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
static BufferedReader bf;
public static void main(String[] args) throws IOException {
try {
bf = new BufferedReader (
new InputStreamReader(
new FileInputStream( "res/text.txt" ), "UTF-8"
)
);
String line = "";
while (line != null) {
line = bf.readLine();
System.out.println(line);
}
} catch (FileNotFoundException e) {
e.printStackTrace();
} finally {
bf.close();
}
}
}
решил если кому интересно