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






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);
  }
}








11.15.InputStreamReader
11.15.1.InputStreamReader
11.15.2.Uses a PrintWriter to write two Chinese characters and read them back.
11.15.3.Reading ISO Latin-1 Encoded Data
11.15.4.Get a class of an object
11.15.5.Deal with Keyboard Input with BufferedReader