FileDocCategorySizeDatePackage
File1000.javaAPI DocExample498Sat Feb 04 07:04:20 GMT 2006None

File1000

public class File1000 extends Object

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

  
    DataOutputStream dos = null;
  
    try {
      dos = new DataOutputStream(new FileOutputStream("1000.dat"));
      for (int i = 1; i <= 1000; i++) {
        dos.writeInt(i);
      }    
    }
    catch (IOException ex) {System.err.println(ex);}
    finally {
      try { if (dos != null) dos.close(); }
      catch (IOException ex) { /* Not much else we can do */ }    
    }