FileDocCategorySizeDatePackage
IntReader.javaAPI DocExample708Sat Feb 04 07:09:28 GMT 2006None

IntReader

public class IntReader extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)


    DataInputStream din = null;
    try {
      FileInputStream fin = new FileInputStream(args[0]);
      System.out.println("-----------" + args[0] + "-----------");
      din = new DataInputStream(fin);
      while (true) {
        int theNumber = din.readInt();
        System.out.println(theNumber);               
      }  // end while 
    } // end try
    catch (EOFException ex) {
      // normal termination
      din.close();
    }
    catch (IOException ex) {
      // abnormal termination
      System.err.println(ex);
    }