Infolinks In Text Ads

Jun 23, 2010

How to get file size in java code, example?

 How to get file size in java code, example

Now we are writing a very simple code for find the file size in java.
Copy and paste this code in your java class.

public static long getFileSize(String filePath)
    {
        File f = new File(filePath);
        return f.length();
    }

No comments:

Post a Comment

LinkWithin

Related Posts Plugin for WordPress, Blogger...