The Java Developers Almanac 1.4


Order this book from Amazon.

   
Home > List of Packages > java.io  [35 examples] > Encodings  [4 examples]

e40. Reading UTF-8 Encoded Data

    try {
        BufferedReader in = new BufferedReader(
            new InputStreamReader(new FileInputStream("infilename"), "UTF8"));
        String str = in.readLine();
    } catch (UnsupportedEncodingException e) {
    } catch (IOException e) {
    }

 Related Examples
e41. Writing UTF-8 Encoded Data
e42. Reading ISO Latin-1 Encoded Data
e43. Writing ISO Latin-1 Encoded Data

See also: Directories    Filenames and Pathnames    Files    Parsing    Reading and Writing    Serialization   


© 2002 Addison-Wesley.