codice:
File f = new File("file.out");
long l = f.length();
length ritorna le dimensioni in bytes.