Java File Size Get getFileSize(File file)

Here you can find the source of getFileSize(File file)

Description

get File Size

License

Apache License

Declaration

public static long getFileSize(File file) 

Method Source Code

//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 + "");
    }
}

Related

  1. getFileSize(File dir)
  2. getFileSize(File element)
  3. getFileSize(File f)
  4. getFileSize(File file)
  5. getFileSize(File file)
  6. getFileSize(File file)
  7. getFileSize(File file)
  8. getFileSize(File file)
  9. getFileSize(File file)