`

The summary of stream in java

阅读更多

Java中流的分类都有哪些?

1)从数据类型分为字节流和字符流

字节流类:

抽象父类: InputStream,OutputStream

实现类包括如下几种:

BufferedInputStream 缓冲流-过虑流
BufferedOutputStream
ByteArrayInputStream 字节数组流-节点流
ByteArrayOutputStream
DataInputStream 处理JAVA标准数据流-过虑流
DataOutputStream
FileInputStream 处理文件IO流-节点流
FileOutputStream
FilterInputStream 实现过虑流-字节过虑流父类
FilterOutputStream
PipedInputStream 管道流
PipedOutputStream
PrintStream 包含print() 和 println()
RandomAccessFile 支持随机文件

抽象父类:Reader, Writer

实现类:

BufferedReader
BufferedWriter
PrintWriter
CharArrayReader
CharArrayWriter
FileReader
FileWriter
FilterReader
FilterWriter
InputStreamReader
OutputStreamWriter
PipedReader
PipedWriter
StringReader
StringWriter

2) 从数据方向分为输入流和输出流

InputXXXXX , OutputXXXXX

3) 从流的功能分为节点流和过滤流

节点流用来传输数据。

过滤流用来封装节点流或者其他过滤流,从而给节点流或其他的过滤流增加一个功能

分享到:
评论

相关推荐

    Java邮件开发Fundamentals of the JavaMail API

    included with the 1.2.1 version of the Java 2 Platform, Enterprise Edition (J2EE), so it is still commonly used. The version of the JavaMail API you want to use affects what you download and install...

    akka in action.zip

    Akka makes it relatively easy to build applications in the cloud or on devices with many cores that efficiently use the full capacity of the computing power available. It's a toolkit that provides an ...

    zipme包---j2me的zip

    InflaterInputStream This filter stream is used to decompress data compressed in the "deflate" format. ZipArchive This class represents a Zip archive. ZipEntry This class represents a member of a zip...

    Addison.Wesley.C++.by.Dissection.2002.pdf

    Based on the provided information from the file "Addison.Wesley.C++.by.Dissection.2002.pdf," we can derive a comprehensive overview of the C++ programming language as covered in this text. The book is...

    python3.6.5参考手册 chm

    PEP 486: Make the Python Launcher aware of virtual environments PEP 488: Elimination of PYO files PEP 489: Multi-phase extension module initialization Other Language Changes New Modules typing ...

    Bulletproof SSL and TLS,PDF , Ivan Ristic

    Man-in-the-Middle Attack 18 2. Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...

    Debugging with GDB --2007年

    Summary of GDB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Free software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Contributors ...

Global site tag (gtag.js) - Google Analytics