Source of Copy.java


  1: /* 
  2:  * Copyright (c) 1999-2002, Xiaoping Jia.  
  3:  * All Rights Reserved. 
  4:  */
  5: 
  6: import java.io.*;
  7: 
  8: /**
  9:  *  This program copies the text read from the standard input to the standard output. 
 10:  */
 11: public class Copy {
 12: 
 13:   public static void main(String[] args) {
 14:     try {
 15:       BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
 16:       String  line;
 17:       while ((line = in.readLine()) != null) {
 18:         System.out.println(line);
 19:       }
 20:     } catch (IOException e) {}
 21:   }
 22: 
 23: }
 24: 
 25: 
 26: