diff --git a/docs/notes/Java IO.md b/docs/notes/Java IO.md index c84c9220..1c634d1d 100644 --- a/docs/notes/Java IO.md +++ b/docs/notes/Java IO.md @@ -98,7 +98,7 @@ Java I/O 使用了装饰者模式来实现。以 InputStream 为例, - FileInputStream 是 InputStream 的子类,属于具体组件,提供了字节流的输入操作; - FilterInputStream 属于抽象装饰者,装饰者用于装饰组件,为组件提供额外的功能。例如 BufferedInputStream 为 FileInputStream 提供缓存的功能。 -

+

实例化一个具有缓存功能的字节流对象时,只需要在 FileInputStream 对象上再套一层 BufferedInputStream 对象即可。 diff --git a/docs/notes/pics/c2c2b633-c03a-426e-b436-5719a194667b.png b/docs/notes/pics/c2c2b633-c03a-426e-b436-5719a194667b.png new file mode 100644 index 00000000..b673d4a7 Binary files /dev/null and b/docs/notes/pics/c2c2b633-c03a-426e-b436-5719a194667b.png differ diff --git a/docs/pics/c2c2b633-c03a-426e-b436-5719a194667b.png b/docs/pics/c2c2b633-c03a-426e-b436-5719a194667b.png new file mode 100644 index 00000000..b673d4a7 Binary files /dev/null and b/docs/pics/c2c2b633-c03a-426e-b436-5719a194667b.png differ