Here you can find the source of getFileSize(File file)
public static long getFileSize(File file)
//package com.java2s; //License from project: Apache License import java.io.File; public class Main { public static long getFileSize(File file) { return Long.parseLong(file.length() + ""); }/*from w w w . j a va 2s .co m*/ public static long getFileSize(byte[] file) { return Long.parseLong(file.length + ""); } }