Here you can find the source of getFileSize(final String path)
public static long getFileSize(final String path)
//package com.java2s; //License from project: Open Source License import java.io.File; public class Main { public static long getFileSize(final File file) { return file.length(); }// w w w . ja va 2 s . c o m public static long getFileSize(final String path) { return getFileSize(getFile(path)); } public static File getFile(final String path) { return new File(path); } }