get File Size - Java File Path IO

Java examples for File Path IO:File Attribute

Description

get File Size

Demo Code


//package com.java2s;

import java.io.File;

public class Main {


    public static long getFileSize(String destFileName) {
        File uploadFile = new File(destFileName);
        return uploadFile.length();

    }/*from   w  w  w  . java  2 s  .co m*/
}

Related Tutorials