summaryrefslogtreecommitdiffstats
path: root/Master/Reference Architectures and Patterns/hjp5/examples/Listing1806.java
blob: f933f3485cbeb33c075f258079aeaa1da45ee45f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* Listing1806.java */

import java.io.*;

public class Listing1806
{
  public static void main(String[] args)
  {
    FileReader f;
    int c;

    try {
      f = new FileReader("c:\\config.sys");
      while ((c = f.read()) != -1) {
         System.out.print((char)c);
      }
      f.close();
    } catch (IOException e) {
      System.out.println("Fehler beim Lesen der Datei");
    }
  }
}