javap –verbose class名 查看class文件的具体内容
javap -c class名
继续看io类
接口 java.io.Closeable
功能:关闭流和相应的资源
java.io.console
功能:使用字节控制台,与当前的java virtual machine 相关
java.io.DataInput
功能:从二进制流中读取字节
java.io.DataInputStream
功能:从一个输入流中读取原始java数据类型。
public class DataInputStream extends FilterInputStream implements DataInput
java.io.DataOutput
功能:任何java原始类型的数据转化为字节,将这些字节写到字节流流中
java.io.DataOutputStream
功能:将原始的java数据类型写入输出流中,也可以用datainputstream将数据读回
java.io.DeleteOnExitHook
功能:持有已经删除的文件集
java.io.EOFException
功能:指示文件的结尾,或已到达流文件的结尾。
java.io.ExpiringCache
功能:清除过期的实体对象
static class Entry {
private long timestamp;
private String val;
Entry(long timestamp, String val) {
this.timestamp = timestamp;
this.val = val;
}
long timestamp() { return timestamp; }
void setTimestamp(long timestamp) { this.timestamp = timestamp; }
String val() { return val; }
void setVal(String val) { this.val = val; }
}
java.io.Externalizable
功能:只有实现了这个接口的实例才会写入序列化的流中,负责保存这个实例的内容。
java.io.File
功能:代表抽象的文件和目录路径名
By default the classes in the
java.io package always resolve relative pathnames against the
current user directory. This directory is named by the system property
user.dir, and is typically the directory in which the Java
virtual machine was invoked.
static private FileSystem fs = FileSystem.getFileSystem();
file.separator
On UNIX systems the value of this
field is '/';
on Microsoft Windows systems it is '\\'.
public static final char separatorChar = fs.getSeparator();
This character is used to
separate filenames in a sequence of files given as a path list.
On UNIX systems, this character is ':'; on Microsoft Windows systems it is ';'.
public static final char pathSeparatorChar = fs.getPathSeparator();
public File(URI uri) {
// Check our many preconditions
if (!uri.isAbsolute())
throw new IllegalArgumentException("URI is not absolute");
if (uri.isOpaque())
throw new IllegalArgumentException("URI is not hierarchical");
String scheme = uri.getScheme();
if ((scheme == null) || !scheme.equalsIgnoreCase("file"))
throw new IllegalArgumentException("URI scheme is not \"file\"");
if (uri.getAuthority() != null)
throw new IllegalArgumentException("URI has an authority component");
if (uri.getFragment() != null)
throw new IllegalArgumentException("URI has a fragment component");
if (uri.getQuery() != null)
throw new IllegalArgumentException("URI has a query component");
String p = uri.getPath();
if (p.equals(""))
throw new IllegalArgumentException("URI path component is empty");
// Okay, now initialize
p = fs.fromURIPath(p);
if (File.separatorChar != '/')
p = p.replace('/', File.separatorChar);
this.path = fs.normalize(p);
this.prefixLength = fs.prefixLength(this.path);
}