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

import java.io.*;

public class Listing1808
{
  public static void main(String[] args)
  {
    BufferedReader f;
    String line;

    try {
      f = new BufferedReader(
          new FileReader("c:\\config.sys"));
      while ((line = f.readLine()) != null) {
        System.out.println(line);
      }
      f.close();
    } catch (IOException e) {
      System.out.println("Fehler beim Lesen der Datei");
    }
  }
}