Java中的IO流分类
输入IO流
输入字节流(InputStream)
处理流
- 缓冲流(BufferedInputStream)
- 转换流
- 数据流(DataInputStream)
- 标准流(System.in(InputStream))
输入字符流(Reader)
处理流
- 缓冲流(BufferedReader)
- 转换流(InputStreamReader)
- 数据流
- 标准流
UML关系图如下所示
PantUML语法
A <|-- B //B继承A
C <|... D //D实现了C
@startuml
abstract class InputStream{
}
class BufferedInputStream{
}
class FilterInputStream{
}
class DataInputStream{
}
interface DataInput{
}
abstract class Reader{
}
class BufferedReader{
}
class InputStreamReader{
}
FilterInputStream <|-- BufferedInputStream
InputStream <|-- FilterInputStream
FilterInputStream <|-- DataInputStream
DataInput <|.. DataInputStream
Reader <|-- BufferedReader
Reader <|-- InputStreamReader
@enduml
输出IO流
输出字节流(OutputStream)
处理流
- 缓冲流(BufferedOutputStream)
- 转换流
- 数据流(DataOutputStream)
- 标准流(System.out(PrintStream))
输出字符流(Writer)
处理流
- 缓冲流(BufferedWriter)
- 转换流(OutputStreamWriter)
- 数据流
- 标准流(PrintWriter)
UML关系图如下所示
PantUML语法
A <|-- B //B继承A
C <|... D //D实现了C
@startuml
abstract class OutputStream{
}
class BufferedOutputStream{
}
class FilterOutputStream{
}
class DataOutputStream{
}
class PrintStream{
}
abstract class Writer{
}
class BufferedWriter{
}
class OutputStreamWriter{
}
class PrintWriter{
}
FilterOutputStream <|-- BufferedOutputStream
OutputStream <|-- FilterOutputStream
FilterOutputStream <|-- DataOutputStream
DataOutput <|.. DataOutputStream
FilterOutputStream <|-- PrintStream
Writer <|-- BufferedWriter
Writer <|-- OutputStreamWriter
Writer <|-- PrintWriter
@enduml
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。