package printing;

/**
 * Insert the type's description here.
 * Creation date: (03/18/13 10:14:17 am)
 * @author: greg
 */
public class FileSize {
/**
 * FileSize constructor comment.
 */
public FileSize() {
	super();
}
/**
 * Insert the method's description here.
 * Creation date: (03/18/13 10:14:28 am)
 * @param args java.lang.String[]
 */
public static void main(String[] args) {
	FileSize f = new FileSize();
	f.run();
}
/**
 * Insert the method's description here.
 * Creation date: (03/18/13 10:15:37 am)
 */
public void run() {
	String fname = "c:\\config.sys";
	try {
		java.io.File fl = new java.io.File(fname);
		long flz = -1;
		try {
			flz = fl.length();
		} catch (Exception e) {
			System.out.println("File error getting length:" + e.toString());
		}
		System.out.println("File length:" + flz);
		java.io.RandomAccessFile rf = new java.io.RandomAccessFile(fname, "r");
		flz = -1;
		try {
			flz = rf.length();
		} catch (Exception e) {
			System.out.println("RandomAccessFile error getting length:" + e.toString());
		}
		System.out.println("RandomAccessFile length:" + flz);
		rf.close();
	} catch (Exception ee) {
		System.out.println("error:" + ee);
	}
}
}
