java.io.File
length
public long length()
Returns the length of the file denoted by this abstract pathname.
Returns:
The length, in bytes, of the file denoted by this abstract pathname, or 0L if the file does not exist
Throws:
SecurityException - If a security manager exists and its SecurityManager.checkRead(java.io.FileDescriptor) method denies read access to the file
length
public long length()
Returns the length of the file denoted by this abstract pathname.
Returns:
The length, in bytes, of the file denoted by this abstract pathname, or 0L if the file does not exist
Throws:
SecurityException - If a security manager exists and its SecurityManager.checkRead(java.io.FileDescriptor) method denies read access to the file
解决方案 »
- 如何用JAVA 判断一个文本文件的编码字符集?高分请教各位大侠!!!
- 请教使用org.apache.commons.net.ftp.FTPClient问题
- 想问问各位,用JAVA写GUI难道真的只能手写?有没有.Net平台那种拖放的工具可以偷懒?(我用的是eclipse)
- StringBuffer str = new StringBuffer( 10 ) ;这里的10是str的容量,我要是想在这10个容量里写东西,要怎么写呢?
- 弱弱问个数组排序问题
- 问一个即时更新JTable中数据的方法
- windows和hp-unix上的时间转化为什么得到不同结果
- 用java写了个applet 插入网页中 在状态栏中却提示class not found 请各位大侠帮忙看看
- java的接口有什么作用?
- 如何通过命令行指定运行某个JAR文件的classpath
- java开发的窗体中改变窗体大小时会触发什么事件及如何根据窗体大小调整控件大小、位置
- 谁能告诉我???(!!!)
long size=f.length();