| File | | | | |
构造方法 | File(String pathname) | | | | |
File(String parent, String child) | | | |
File(File parent, String child) | | | | |
创建功能 | boolean createNewFile() | | |
boolean mkdir()
boolean mkdirs() | | |
删除功能 | delete() | | |
判断功能 | exists() isFile() isDirectory()
isAbsolute() canRead() canWrite()
isHidden( | | |
获取功能 | String getAbsolutePath()
String getPath()
String getName()
int length()
long lastModified() | | | | |
重要获取 | tatic File[] listRoots()
String[] list()
File[] listFiles() | list(FilenameFilter filter)
listFiles(FileFilter filter) | | |
文件过滤器 | FilenameFilter(File一个构造参数) | | | | |
| | | | | |
| FileWriter | BufferedWriter | FileOutputStream | BufferedOutputSteam |
构造方法 | FileWriter(File file) | | FileOutputStream(File file) | |
FileWriter(String fileName) | | FileOutputStream(String name) | |
写入方法 | write(int c) | write(int c) | write(int b) | write(int b) |
write(char[] cbuf, int off, int len) | write(char[] cbuf, int off, int len) | [url=#write(byte[], int, int)]write(byte[] b, int off, int len)[/url] | [url=#write(byte[], int, int)]write(byte[] b, int off, int len)[/url] |
write(char[] cbuf) | write(char[] cbuf) | write(byte[] b) | |
write(String str) | | | |
write(String str, int off,
int len) | write(String s, int off, int len) | | |
| | newLine() | | |
| FileReader | BufferedReader | FileInputStream | BufferedInputSteam |
构造方法 | FileReader(File file) | | FileInputStream(File file) | |
FileReader(String fileName) | | FileInputStream(String name) | |
读取方法 | read() | read() | read() | read() |
int read(char[] cbuf, int off,
int len) | int read(char[] cbuf, int off,int len) | int read(char[] cbuf, int off,
int len) | int read(char[] cbuf,
int off,int len) |
int read(char[] cbuf)
(创建char[]数组) | | int read(char[] cbuf)
(创建char[]数组) | |
| readLine() | | |