Here you can find the source of getFileSize(File file)
public static long getFileSize(File file)
//package com.java2s; import java.io.File; public class Main { public static long getFileSize(File file) { return file.length(); }//from www . ja va 2s . c om }