标签:
Java.io定义的I/O类如下表所示:
BufferedInputStream | BufferedOutputStream | BufferedReader | BufferedWriter | ByteArrayInputStream | ByteArrayOutputStream | CharArrayWriter | Console | DataInputStream |
DataOutputStream | File | FileDescriptor | FileInputStream | FileOutputStream | FilePermission | FileReader | FileWriter | FilterInputStream |
FilterOutputStream | FilterReader | FilterWriter | InputStream | InputStreamReader | LineNumberReader | ObjectInputStream | Writer | OutputStream |
ObjectOutputStream | ObjectStreamClass | ObjectStreamFile | PipedReader | PipedInputStream | PipedOutputStream | PipedWriter | Reader | PrintStream |
PrintWriter | StreamTokenizer | StringReader | StringWriter | RandomAccessFile |
Java 中基于流的I/O以4个抽象类为基础:InputStream,OutputStream,Reader 和 Writer。InputStream 和 OutputStream 用于字节流,Reader 和 Writer用于字符流。一般而言,当与字符或字符串打交道时,应该使用字符流类,而在与字符和其他的二进制对象打交道时,应该使用字节流类。
标签:
原文地址:http://www.cnblogs.com/hoojjack/p/4761896.html