| 目次 |
|---|
|
・ファイルサイズを取得する ・サンプルソース ・サンプルソース |
import java.io.File;
public class Test{
public static void main(String[] args) {
File file = new File("C:\\test.txt");
System.out.println(file.length());
}
}
24279上記のように、バイト数が表示されます。