Use o método File.length().
 
Exemplo:
------------------------------------------------------------------------
import java.io.File;
class TesteFile
{
 public static void main(String[] args)
 {
 
  File ff = new File(args[0]);
  if (ff.exists())  {
      System.out.println(">>> " + ff.length());
  }
 }
}
-------------------------------------------------------------------------
 
Roberto Tatemoto
Será que existe alguma metodo ou classe p/ eu verificar o tamanho do arquivo ?
Se alguém tiver alguma dica, documentação ou exemplo será muito bem vindo.
 
 

Responder a