
package rob.servlets.addressbook ;

import java.io.* ;
import java.util.* ;


/**
 * Page 
 *
 *
 * Created: Fri Mar  9 16:05:14 2001
 *
 * @author <a href="mailto: "Robert Judd</a>
 * @version
 */

public class Page {

    public Page() {}
    
    public void write(PrintWriter w) {
	for (int i=0, max=data.length; i<max; ++i) {
	    if (i != MESSAGE_LINE)
		w.println(data[i]) ;
	    else 
		w.println("Generated by AddressBookServlet "+new Date().toString());
	}
	w.flush() ;
	w.close() ;
    }

    public static void main(String[] args) {

	try {
	    PrintWriter w ;
	    if (args[0].equals("-"))
		w = new PrintWriter(System.out) ;
	    else
		w = new PrintWriter(new FileWriter(args[0])) ;
	    for (int i=0, max=data.length; i<max; ++i) {
		if (i != MESSAGE_LINE)
		    w.println(data[i]) ;
		else 
		    w.println
			("Generated by Page "+new Date().toString()) ;
	    }
	    w.flush() ;
	    w.close() ;
	} catch (Exception ex) {
	    System.out.println
		("Usage: java rob.servlets.addressbook.Page ( filename | - )");
	}


    }

    public static final int MESSAGE_LINE = 0 ;
    public static final String[] data = new String[] {

    } ;


}// Page
