annotate src/fdl/test2/TestRead.java @ 53:629b6cfbd37f

metaprotocol ring
author axmo
date Mon, 19 Jan 2009 17:49:14 +0900
parents
children 82a292aa41ad
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
53
629b6cfbd37f metaprotocol ring
axmo
parents:
diff changeset
1 package fdl.test2;
629b6cfbd37f metaprotocol ring
axmo
parents:
diff changeset
2
629b6cfbd37f metaprotocol ring
axmo
parents:
diff changeset
3 import java.io.*;
629b6cfbd37f metaprotocol ring
axmo
parents:
diff changeset
4
629b6cfbd37f metaprotocol ring
axmo
parents:
diff changeset
5 public class TestRead {
629b6cfbd37f metaprotocol ring
axmo
parents:
diff changeset
6
629b6cfbd37f metaprotocol ring
axmo
parents:
diff changeset
7 public static void main(String[] args) {
629b6cfbd37f metaprotocol ring
axmo
parents:
diff changeset
8 try {
629b6cfbd37f metaprotocol ring
axmo
parents:
diff changeset
9 File inputFile = new File(args[0]);
629b6cfbd37f metaprotocol ring
axmo
parents:
diff changeset
10 FileReader in = new FileReader(inputFile);
629b6cfbd37f metaprotocol ring
axmo
parents:
diff changeset
11 BufferedReader br = new BufferedReader(in);
629b6cfbd37f metaprotocol ring
axmo
parents:
diff changeset
12 String line;
629b6cfbd37f metaprotocol ring
axmo
parents:
diff changeset
13 while ((line = br.readLine()) != null) {
629b6cfbd37f metaprotocol ring
axmo
parents:
diff changeset
14 System.out.println(line);
629b6cfbd37f metaprotocol ring
axmo
parents:
diff changeset
15 }
629b6cfbd37f metaprotocol ring
axmo
parents:
diff changeset
16 br.close();
629b6cfbd37f metaprotocol ring
axmo
parents:
diff changeset
17 in.close();
629b6cfbd37f metaprotocol ring
axmo
parents:
diff changeset
18 } catch (IOException e) {
629b6cfbd37f metaprotocol ring
axmo
parents:
diff changeset
19 System.out.println(e);
629b6cfbd37f metaprotocol ring
axmo
parents:
diff changeset
20 }
629b6cfbd37f metaprotocol ring
axmo
parents:
diff changeset
21 }
629b6cfbd37f metaprotocol ring
axmo
parents:
diff changeset
22
629b6cfbd37f metaprotocol ring
axmo
parents:
diff changeset
23 }