Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main(String[] args)
- {
- try {
- File fileDir = new File("c:\\temp\\test.txt");
- BufferedReader in = new BufferedReader(
- new InputStreamReader(
- new FileInputStream(fileDir), "UTF8"));
- String str;
- while ((str = in.readLine()) != null) {
- System.out.println(str);
- }
- in.close();
- }
- catch (UnsupportedEncodingException e)
- {
- System.out.println(e.getMessage());
- }
- catch (IOException e)
- {
- System.out.println(e.getMessage());
- }
- catch (Exception e)
- {
- System.out.println(e.getMessage());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement