Reading ISO Latin-1 Encoded Data : InputStreamReader « File Input Output « Java






Reading ISO Latin-1 Encoded Data

 

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.InputStreamReader;

public class Main {
  public static void main(String[] argv) throws Exception {

    BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream("infilename"),
        "8859_1"));
    String str = in.readLine();
    System.out.println(str);
  }
}

   
  








Related examples in the same category

1.Create BufferedReader from InputStreamReader
2.Create BufferedReader from InputStreamReader and URL
3.Create BufferedReader from InputStreamReader and read line by line
4.Deal with Keyboard Input with BufferedReader