java rt_java中rt包中源码了解
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);
}
總結
以上是生活随笔為你收集整理的java rt_java中rt包中源码了解的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: mysql实现程序的动态链接_程序的链接
- 下一篇: .net 开发 html框架,Asp.n