完成文件IO的内容

master
高宏宇 2 years ago
parent d735a5d58f
commit 08a34be4b6

@ -1,8 +1,8 @@
> Data stored in a text file is represented in human-readable form. Data stored in a binary file is represented in binary form. You cannot read binary files. They are designed to be read by programs. For example, Java source programs are stored in text files and can be read by a text editor, but Java classes are stored in binary files and are read by the JVM. The advantage of binary files is that they are more efficient to process than text files.
## Java的I/O抽象
## 1. Java的I/O抽象
### 网络通讯对象的抽象
### 1.1. 网络通讯对象的抽象
我们考虑一个问题,如果要实现两个程序之间的通讯应该如何使用面向对象的思维来设计?首先我们需要把通讯进行抽象化,如果使用一个对象来进行通讯,应该如何操作?
![Alt text](img/comm.drawio.svg)
@ -64,7 +64,7 @@ classDiagram
从上个例子中我们看到了如何从面向对象的思维来解决实际的问题。在即将学到的网络课程当中会发现网络的构建真的也有面向对象的思想。
### 文件的抽象
### 1.2. 文件的抽象
好了现在我们来看看主题文件系统。文件中存放的最小单元也是字节byte因此可以沿用上面网络的例子。只不过这是一个真实的
@ -78,7 +78,7 @@ classDiagram
**注意InputStreamOutputStream这两个类不是只针对文件系统凡是可以进行字节读写的类都可以由这两个类进行扩展例如网络中的通讯。从这里可以看到Java不仅仅是面向对象的语言由于Java提供了一套基本的API使得java也是一套编码规范或者是框架。多数情况下需要满足Java中基本类型和接口的继承才能使程序更具有通用性。**
#### InputStream
#### 1.2.1. InputStream
![image-20230326144650268](img/image-20230326144650268.png)
@ -88,13 +88,15 @@ classDiagram
**提高为什么只是read()函数是抽象函数其几个重载的read函数并不是抽象函数可以通过分析源码来理解。**
#### OutputStream
#### 1.2.2. OutputStream
![image-20230326151620467](img/image-20230326151620467.png)
同样write函数的参数类型虽然是int实际是写入一个字节。
### FileInputStream/FileOutputStream
## 2. 文件流的操作
### 2.1. FileInputStream/FileOutputStream
![image-20230326151754475](img/image-20230326151754475.png)
@ -137,7 +139,226 @@ public class TestFileStream {
**注意这两个类的构造函数是重载的有一个版本可以接受一个File对象作为需要打开的文件。其实在Java中大多预定义类都可以接受字符串或者是File对象具体情况需要查看源码实现。**
### DataInputStream/DataOutputStream
### 2.2. DataInputStream/DataOutputStream
在学习`DataInputStream` 和 `DataOutputStream` 前,我们先来看看其直接超类:`FilterInputStream` 和 `FilterOutputStream`
![image-20230326210655128](img/image-20230326210655128.png)
> Filter streams are streams that filter bytes for some purpose. The basic byte input stream provides a read method that can only be used for reading bytes. If you want to read integers, doubles, or strings, you need a filter class to wrap the byte input stream. Using a filter class enables you to read integers, doubles, and strings instead of bytes and characters. FilterInputStream and FilterOutputStream are the base classes for filtering data. When you need to process primitive numeric types, use DataInputStream and DataOutputStream to filter bytes.
>
> 这个类很奇怪,书上说如果需要做不同数据类型的读写,需要该类型。其实情况要复杂得多,有兴趣可以研究其源代码。奇怪的是,这个类型是非抽象类型,但是却不能使用 new 方法创建(看源码可以分析出来)。
关于这个类其实要讲的话会很多,现在大家知道是 InputStream 和 OutputStream 的超类就可以了。
再来看看InputStream 和 OutputStream这两个类是可以实例化的并可以读写文件的各种基本类型原始类型
![image-20230326154038645](img/image-20230326154038645.png)
这个类的基本接口如下图:
![image-20230326222237336](img/image-20230326222237336.png)
![image-20230326222303342](img/image-20230326222303342.png)
现在看看例子:
```java
import java.io.*;
public class TestDataStream {
public static void main(String[] args) throws IOException {
try ( // Create an output stream for file temp.dat
DataOutputStream output = new DataOutputStream(new FileOutputStream("/home/danny/temp.dat"));) {
// Write student test scores to the file
output.writeUTF("John");
output.writeDouble(85.5);
output.writeUTF("Jim");
output.writeDouble(185.5);
output.writeUTF("George");
output.writeDouble(105.25);
}
try ( // Create an input stream for file temp.dat
DataInputStream input = new DataInputStream(new FileInputStream("/home/danny/temp.dat"));) {
// Read student test scores from the file
System.out.println(input.readUTF() + " " + input.readDouble());
System.out.println(input.readUTF() + " " + input.readDouble());
System.out.println(input.readUTF() + " " + input.readDouble());
}
}
}
```
如果要讨论 DataInputStream 和 DataOutputStream 内部实现可能超出了目前的内容。简单来说,无论是 DataInputStream 还是 DataOutputStream ,其构造函数都传递了一个 FileInputStream 或者 FileOutputStream 对象。研究其源码,发现,构造 DataInputStream 需要传入的是 InputStream 类型, FileInputStream 是 InputStream 的子类,这样做没有什么问题; FileInputStream 提供了读取文件字节的基本能力DataInputStream 只需要借用 FileInputStream 的基本能力就可以完成对原始数据的基本读写了。
如果为 DataInputStream 的构造函数传递一个网络对象,且这个对象所在的类实现了 InputStream 中的抽象方法,那么 DataInputStream 也可以实现对网络数据的读取相对的DataOutputStream 对应的应该是 OutputStream 的实现类。
这样以来 DataInputStream 和 DataOutputStream 和具体如何读写文件就无关了因为是FileInputStream 和 FileOutputStream 完成具体的文件读写工作。
![Alt text](img/DataStream.drawio.svg)
上图中说明了其实DataInputStream 和 DataOutputStrem 其实和具体读写什么是无关的要看构造的时候传进去什么对象。这样是不是就和本章开始讲的网络传输的例子联系起来了。只不过这里更进一步有分层实现的概念这点在网络ISO模型中也有体现。从另外一个角度来说上层是服务使用者下层是服务提供者是不是和我们日常的组织与管理非常类似因此面向对象是我们熟知的一种方法Java只不过是其应用而已。
**注意:这个例子中的写入顺序和读取顺序必须完全一致,否则读取的数据会不正确。想一想为什么?**
### 2.3. 文件复制
文件复制这个例子中使用到了`BufferedInputStream`和`BufferedOutputStream`。者两个类的基本能力是读写字节只不过内部使用缓冲的机制来降低CPU占用提升IO操作速度。
关于缓冲机制用一个浇花的例子来解释:
1. 水管放水:输入操作,水是输入的数据;
2. 人如果CPU使用水数据进行函数处理浇花这个动作
3. 水的最小单位是一杯,对应一个字节。
因为假如CPU人的处理速度很快数据水管的流速相对于人的处理来说很慢或者说是相反水管数据的流速很快CPU的处理速度较慢。那么这个任务中防水速度和人的操作速度不匹配就会造成很多问题要么累死人要么水撒了一地数据丢失
例如,无缓冲的情况:人很快,水流较慢;人每次接一杯水去浇花(一个字节)。这样人会累死,效率也非常低。
有缓冲的情况:用一个桶装水,桶满了后,人可以一次性的去浇花;然后再等桶接满水。在桶接水的这段时间,人可以休息,或者做其他的事情。这里的桶就是缓冲。
缓冲机制在计算机中大量使用因为各种任务耗时不同或者是I/O设备间的速度差异。因此使用缓冲机制可以提升效率降低CPU的占用使得CPU有时间去处理其他任务。
![Alt text](img/BufferedSteam.drawio.svg)
```java
import java.io.*;
public class Copy {
/**
*
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
// Check command-line parameter usage
if (args.length != 2) {
System.out.println("Usage: java Copy sourceFile targetfile");
System.exit(1);
}
// Check if source file exists
File sourceFile = new File(args[0]);
if (!sourceFile.exists()) {
System.out.println("Source file " + args[0] + " does not exist");
System.exit(2);
}
// Check if target file exists
File targetFile = new File(args[1]);
if (targetFile.exists()) {
System.out.println("Target file " + args[1] + " already exists");
System.exit(3);
}
try (
// Create an input stream
BufferedInputStream input = new BufferedInputStream(new FileInputStream(sourceFile));
// Create an output stream
BufferedOutputStream output = new BufferedOutputStream(new FileOutputStream(targetFile));) {
// Continuously read a byte from input and write it to output
int r, numberOfBytesCopied = 0;
while ((r = input.read()) != -1) {
output.write((byte) r);
numberOfBytesCopied++;
}
// Display the file size
System.out.println(numberOfBytesCopied + " bytes copied");
}
}
}
```
代码中使用了命令行参数,因此需要在命令行下使用,请参考数组那一章。
1. 编译程序:`javac Copy.java`
2. 运行程序:`java Copy 源文件 目的文件`
和DataInputSteam和DataOutputStream一样BufferedInputStream 使用了 FileInputStream 完成文件读写的能力FileOutputStream 使用 FileOutputStream 完成文件写的能力。剩下的就是 BufferedInputStream 读取一个字节在使用 BufferedOutputStream x写到一个文件中。
**注意:这个例子没有使用的是字节的读取和写入,效率比较低,没有充分使用缓冲的能力(使用杯子接水)。其实可以读取和写入字节数组(水桶)来优化效率。缓冲不宜过大,也不宜过小,根据具体的情况来确定。**
### 2.4. 随机文件访问
上面所有例子都是顺序访问下面来看看Java的随机访问。随机访问可以把文件看成是一个数组从数组的角度来理解从数组的任意位置读写数据就可以了。与数组不同的是文件的长度是可以增加的。接下来先看看RadomAccessFile这个类
![image-20230327094343661](img/image-20230327094343661.png)
RadomAccessFile 实现了DataInput 和 DataOutput的接口意味着它可以实现原始数据类型的读写。同样构造 RadomAccessFile 的时候,需要传入一个字符串作为打开的文件位置,或者是一个文件对象。另外还需要一个字符串确定文件的打开方式。
1. 'r' 以只读方式打开。调用结果对象的任何 write 方法都将导致抛出 IOException。
2. "rw" 打开以便读取和写入。如果该文件尚不存在,则尝试创建该文件。
3. "rws" 打开以便读取和写入,对于 "rw",还要求对文件的内容或元数据的每个更新都同步写入到底层存储设备。
4. "rwd" 打开以便读取和写入,对于 "rw",还要求对文件内容的每个更新都同步写入到底层存储设备。
目前不用具体关心打开文件的具体含义只需要知道rw方式是读写方式就可以了。
```java
import java.io.*;
public class TestRandomAccessFile {
public static void main(String[] args) throws IOException {
try ( // Create a random access file
RandomAccessFile inout = new RandomAccessFile("/home/danny/inout.dat", "rw");) {
// Clear the file to destroy the old contents if exists
inout.setLength(0); // 设置文件长度为0 ,如果以前有文件,表示删除文件的所有内容。
// Write new integers to the file
for (int i = 0; i < 200; i++) // 0
inout.writeInt(i); // 写入200个int,一个int占用4个字节执行完成后文件指针是800
// Display the current length of the file
System.out.println("Current file length is " + inout.length()); // 文件大小是800个字节
// Retrieve the first number
inout.seek(0); // Move the file pointer to the beginning // 文件指针移动到0,最开始的位置
System.out.println("The first number is " + inout.readInt()); // 读取一个int,上述循环写入的值是0
// Retrieve the second number
inout.seek(1 * 4); // Move the file pointer to the second number 移动到4,刚刚是下一个整形开始的位置读出1
System.out.println("The second number is " + inout.readInt());
// Retrieve the tenth number
inout.seek(9 * 4); // Move the file pointer to the tenth number 移动到第十个整形的位置读出9
System.out.println("The tenth number is " + inout.readInt());
// Modify the eleventh number 上一句执行完成后指针在10*4=40的位置刚好是第11个整形开始的地方
inout.writeInt(555); // 改写第11个整形为555
// Append a new number
inout.seek(inout.length()); // Move the file pointer to the end 移动指针到文件末尾800位置
inout.writeInt(999); // 写入一个整形后指针是804
// Display the new length
System.out.println("The new length is " + inout.length()); // 打印长度是 804
// Retrieve the new eleventh number
inout.seek(10 * 4); // Move the file pointer to the eleventh number 移动到第11个整形的位置读取刚刚写入的555
System.out.println("The eleventh number is " + inout.readInt());
}
}
}
```
随机读写最重要的就是文件指针,可以理解成数组的位置,所有的读写操作都从这个位置开始。
1. 读取相应个数字节,文件指针向后一定相应字节;
2. 写入相应个数字节,文件指针向后一定相应字节。
seek用于将文件指针移动到绝对位置。文件指针指向的是当前准备读或者是准备写的位置。
## 3. 本章重点
1. 理解ImputStream和OutStrem以及子类间的关系
2. 掌握FileInputStream和FileOutputStream的基本使用
3. 理解随即文件访问对象RandomAccessFile的使用
4. 其他部分是了解。

@ -0,0 +1,279 @@
<svg host="65bd71144e" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="652px" height="332px" viewBox="-0.5 -0.5 652 332" content="&lt;mxfile&gt;&lt;diagram id=&quot;sv2Wpp69pxSE8AizLORF&quot; name=&quot;第 1 页&quot;&gt;3ZrLctowFIafxtuObfm6DIG0XXTSGRZtl8I+BrXGYhQRoE9fuZaxhUxIwJYz2WSkIx9J59cXXbHQ/Xr/meHN6htNIbdcO91baGq5bmzH4m9pOFSGwHMrw5KRtDI5jWFO/oI02tK6JSk8KR9ySnNONqoxoUUBCVdsmDG6Uz/LaK62usFL0AzzBOe69QdJ+aqyRm7Y2L8AWa7qlp1ABrzG9ccykqcVTumuZUIzC90zSnmVWu/vIS+1q3Wp/B7OlB47xqDgr3GQuj/jfCtje1z8LiWrescPdciMbosUSi/bQpPdinCYb3BSlu7EGAvbiq9zkXNEUlYKjMP+bMecY7gCE6Br4OwgPpEOSAokCTkKtmv0dmrbqqV17YflEC+PNTcqiIQU4owovhY+pAIAmS1oAWq8IiZ2+NnO/CqF+iQqkvnpXipX5Q51bk/4z1a6cvNlrnEqM7VP1beyQy9LK/pPtyyRXyH5b4LZEnhr7PUBYJBjTp7V2m+RE2mMWW6Qi05MiEgsy8TXYrPlc84Ar+syUeux+DYaM5Ln9zSn7L8vyjIIkkTYnzijf6BVkobxwrb74de1VYAdZBLg4K0AX8HhOejDS9BfB7A3HsDeZYAft/yjE4wcgwQ78YgEX5y2ryPY1wlGhgj2NYIfSA7KrNsjnymGKOvkM0giWGQ97RAClc/Q5ARra4K9jOd1xAQ34iFdv1MiGmmEc0+WJs9Xq6gIlV4nohy78Sqdgi7uOLChyMuiBLpnxkXke35PM+MpeWbXdkdT7LrN6cV12tzmNBxvZgw1QqsDUG+EDsFbbJI37+PxFum8eYZ4i87wpm4g3xlwyOjainoCbphdXDweO/GZ1bQ/dt7Fcmr0oOG6PdH2ju56av3GYLRu++SoMRii45w1XN/kWfit15FXUlPfpLeoufUA8uoQHY2aKeZ4sAOqD1HqdUETuQsUBP1A459u22yT0Lz5CtDsdZ7jjkibq9E22WYZMEiHIg4cwVzYRVwchAgPRVxgkrjIzDTV8ZIRmwJHf8qowRlsgRuHHOSZJCc0Q07HE4IxcvQ3hHKBG25bNMoK50Ymd+761Y01C6zozppMrVlkTRzrzrFmfpmI9F2+iJqrEqpSSeraukoTzsmyENlEqATCPik1JAnO72TBmqRp2UznmKmj2sMgaE/lHcenoJ8xENnmpwnVdXDz+w40+wc=&lt;/diagram&gt;&lt;/mxfile&gt;">
<defs/>
<g>
<rect x="0" y="150" width="120" height="30" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 165px; margin-left: 1px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
Object
</div>
</div>
</div>
</foreignObject>
<text x="60" y="169" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
Object
</text>
</switch>
</g>
<path d="M 170 75 L 123.3 152.05" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 120.58 156.54 L 121.21 148.74 L 123.3 152.05 L 127.2 152.37 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<rect x="170" y="60" width="120" height="30" fill="#ffe6cc" stroke="#d79b00" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 75px; margin-left: 171px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
<i>
InputStream
</i>
</div>
</div>
</div>
</foreignObject>
<text x="230" y="79" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
InputStream
</text>
</switch>
</g>
<path d="M 170 255 L 123.3 177.95" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 120.58 173.46 L 127.2 177.63 L 123.3 177.95 L 121.21 181.26 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<rect x="170" y="240" width="120" height="30" fill="#ffe6cc" stroke="#d79b00" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 255px; margin-left: 171px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
<i>
OutputStream
</i>
</div>
</div>
</div>
</foreignObject>
<text x="230" y="259" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
OutputStream
</text>
</switch>
</g>
<path d="M 330 15 L 293.86 62.43" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 290.68 66.61 L 292.14 58.92 L 293.86 62.43 L 297.7 63.16 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<rect x="330" y="0" width="120" height="30" fill="#dae8fc" stroke="#6c8ebf" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 15px; margin-left: 331px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
FileInputStream
</div>
</div>
</div>
</foreignObject>
<text x="390" y="19" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
FileInputStream
</text>
</switch>
</g>
<path d="M 330 75 L 296.37 75" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 291.12 75 L 298.12 71.5 L 296.37 75 L 298.12 78.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<rect x="330" y="60" width="120" height="30" fill="#f8cecc" stroke="#b85450" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 75px; margin-left: 331px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
FilterInputStream
</div>
</div>
</div>
</foreignObject>
<text x="390" y="79" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
FilterInputStream
</text>
</switch>
</g>
<path d="M 330 135 L 293.86 87.57" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 290.68 83.39 L 297.7 86.84 L 293.86 87.57 L 292.14 91.08 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<rect x="330" y="120" width="120" height="30" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 135px; margin-left: 331px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
ObjectInputStream
</div>
</div>
</div>
</foreignObject>
<text x="390" y="139" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
ObjectInputStream
</text>
</switch>
</g>
<path d="M 330 315 L 293.86 267.57" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 290.68 263.39 L 297.7 266.84 L 293.86 267.57 L 292.14 271.08 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<rect x="330" y="300" width="120" height="30" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 315px; margin-left: 331px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
ObjectOutputStream
</div>
</div>
</div>
</foreignObject>
<text x="390" y="319" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
ObjectOutputStream
</text>
</switch>
</g>
<path d="M 330 255 L 296.37 255" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 291.12 255 L 298.12 251.5 L 296.37 255 L 298.12 258.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<rect x="330" y="240" width="120" height="30" fill="#f8cecc" stroke="#b85450" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 255px; margin-left: 331px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
FilterOutputStream
</div>
</div>
</div>
</foreignObject>
<text x="390" y="259" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
FilterOutputStream
</text>
</switch>
</g>
<path d="M 330 195 L 293.86 242.43" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 290.68 246.61 L 292.14 238.92 L 293.86 242.43 L 297.7 243.16 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<rect x="330" y="180" width="120" height="30" fill="#dae8fc" stroke="#6c8ebf" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 195px; margin-left: 331px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
FileOutputStream
</div>
</div>
</div>
</foreignObject>
<text x="390" y="199" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
FileOutputStream
</text>
</switch>
</g>
<path d="M 530 54 L 456.3 65.06" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 451.11 65.83 L 457.51 61.33 L 456.3 65.06 L 458.55 68.26 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<rect x="530" y="30" width="120" height="30" fill="#d5e8d4" stroke="#82b366" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 45px; margin-left: 531px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
DataInputStream
</div>
</div>
</div>
</foreignObject>
<text x="590" y="49" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
DataInputStream
</text>
</switch>
</g>
<path d="M 530 95.36 L 456.29 83.51" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 451.1 82.68 L 458.57 80.33 L 456.29 83.51 L 457.46 87.24 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<rect x="530" y="90" width="120" height="30" fill="#e1d5e7" stroke="#9673a6" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 105px; margin-left: 531px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
BufferedInputStream
</div>
</div>
</div>
</foreignObject>
<text x="590" y="109" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
BufferedInputStream
</text>
</switch>
</g>
<path d="M 530 276 L 456.3 264.94" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 451.11 264.17 L 458.55 261.74 L 456.3 264.94 L 457.51 268.67 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<rect x="530" y="270" width="120" height="30" fill="#e1d5e7" stroke="#9673a6" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 285px; margin-left: 531px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
BufferedOutputStream
</div>
</div>
</div>
</foreignObject>
<text x="590" y="289" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
BufferedOutputStream
</text>
</switch>
</g>
<path d="M 530 234 L 456.3 245.06" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 451.11 245.83 L 457.51 241.33 L 456.3 245.06 L 458.55 248.26 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<rect x="530" y="210" width="120" height="30" fill="#d5e8d4" stroke="#82b366" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 225px; margin-left: 531px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
DataOutputStream
</div>
</div>
</div>
</foreignObject>
<text x="590" y="229" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
DataOutputStream
</text>
</switch>
</g>
<rect x="200" y="140" width="60" height="30" fill="none" stroke="none" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 155px; margin-left: 201px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
抽象层
</div>
</div>
</div>
</foreignObject>
<text x="230" y="159" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
抽象层
</text>
</switch>
</g>
</g>
<switch>
<g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/>
<a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank">
<text text-anchor="middle" font-size="10px" x="50%" y="100%">
Text is not SVG - cannot display
</text>
</a>
</switch>
</svg>

After

Width:  |  Height:  |  Size: 24 KiB

@ -0,0 +1,210 @@
<svg host="65bd71144e" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="665px" height="500px" viewBox="-0.5 -0.5 665 500" content="&lt;mxfile&gt;&lt;diagram id=&quot;NDGbkYY25Yec_Fe8YBJr&quot; name=&quot;第 1 页&quot;&gt;7ZpNc5swEIZ/ja4dCYEkjv5K20OnnfGhZwVkmwm2PFiOnf76ghHGIDkhHuR0GnLIiJVY0PMui7QY4Mn6+DXj29UPGYsUeDA+AjwFnscoyv8XhpfSQCksDcssiUsTqg3z5I/QxmrYPonFrjFQSZmqZNs0RnKzEZFq2HiWyUNz2EKmzatu+VIYhnnEU9P6O4nVSk/Lo7X9m0iWq+rKiIRlz5pXg/VMdisey8OFCc8AnmRSqrK1Pk5EWrCruJTnPVzpPd9YJjaqywleecIzT/d6blOu+PfNdq/mKhN8rW9TvVRzz+R+E4vidAjw+LBKlJhveVT0HnKxc9tKrdP8COXNhdwoLZ+Hi+MkTScyldnJF44DwWI/t+9UJp/ERQ/zHjEheY85IT3HZ5Epcbww6Ql+FXItVPaSD9G9vmatg+0sxqGWzgv1mNWFbETbuI6W5dlzDTRvaKZ2vtjK9+de3QfwgkUiimyAH1ngB7AnwMj/OMK+QfghSYWLCEaBCZhAHiKqx12CP/3ZwHtTSmBf4JuRjTEyuCPsiHtgcJ/L6Emoz0Hegx+InlhD3klSsZGPGYQUv4f8KIDQd5Rs7kqeXgn6T8I+IB2i3vfdsA8N9mAWABaAMQEzH4zHIKwaIwxmFIwgYMjt+oULtrC+XknExOPCSZb3TOaEOIp3hEzobaD5EnZbNBepOI6KxXU+a7GJdXMapXy3S6LbovyGaBZxY+1uUr3gFliwVbZMpFwlz80Vv42lvsIvmeR3UotG2ZegoZsPW052cp9FQp93uUZ/2xVtuVI8WwpluDrJe556N8XNHcE9FIeQ8dO72VAcwoC+/tb+RxRH0H9Lpq6KW1y1g6dHxc09yqB4J8U90pviFlcOFTf3TENW76Q4waivrG5x5TCrm7u14Rm/MatjD96muOnqfJMOFDc3iYPiN2b1mxU3XblU3NycDlm9Y1aHr4vUPae39sftwOlRbTao3dfO7Ga9TVcuFbcUQIaM3ukdztppGLWLI53f4Yar0JngVSgNj/h7BQ+qGuQVjbqq3fZjhE2PYlsqbTNSlDQZ1VXNMTHk77OYKVAcCGrTPSQU8/pjrFG5tIRC12Kmz/TxW9V7H14Pgq7VzOr5aTCmYDwFITo1xiCcOGWMHjkSnj2Zktno4ZXCfg/s2x+t7gvfUmb6LwO89X3qvpAtlZ3PFOEBvR/8/LD+nU6Z8esfO+HZXw==&lt;/diagram&gt;&lt;/mxfile&gt;">
<defs/>
<g>
<rect x="0" y="148" width="290" height="60" fill="#d5e8d4" stroke="#82b366" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 288px; height: 1px; padding-top: 178px; margin-left: 1px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 23px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
DataInputStream
</div>
</div>
</div>
</foreignObject>
<text x="145" y="185" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="23px" text-anchor="middle">
DataInputStream
</text>
</switch>
</g>
<rect x="374" y="148" width="290" height="60" fill="#f8cecc" stroke="#b85450" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 288px; height: 1px; padding-top: 178px; margin-left: 375px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 23px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
DataOutputStream
</div>
</div>
</div>
</foreignObject>
<text x="519" y="185" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="23px" text-anchor="middle">
DataOutputStream
</text>
</switch>
</g>
<rect x="0" y="310" width="130" height="60" fill="#60a917" stroke="#2d7600" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 128px; height: 1px; padding-top: 340px; margin-left: 1px;">
<div data-drawio-colors="color: #ffffff; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 15px; font-family: Helvetica; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
FileInputStream
</div>
</div>
</div>
</foreignObject>
<text x="65" y="345" fill="#ffffff" font-family="Helvetica" font-size="15px" text-anchor="middle">
FileInputStream
</text>
</switch>
</g>
<rect x="160" y="310" width="130" height="60" fill="#60a917" stroke="#2d7600" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 128px; height: 1px; padding-top: 340px; margin-left: 161px;">
<div data-drawio-colors="color: #ffffff; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 15px; font-family: Helvetica; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
SocketInputStream
</div>
</div>
</div>
</foreignObject>
<text x="225" y="345" fill="#ffffff" font-family="Helvetica" font-size="15px" text-anchor="middle">
SocketInputStream
</text>
</switch>
</g>
<rect x="374" y="310" width="130" height="60" fill="#d80073" stroke="#a50040" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 128px; height: 1px; padding-top: 340px; margin-left: 375px;">
<div data-drawio-colors="color: #ffffff; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 15px; font-family: Helvetica; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
FileOutputStream
</div>
</div>
</div>
</foreignObject>
<text x="439" y="345" fill="#ffffff" font-family="Helvetica" font-size="15px" text-anchor="middle">
FileOutputStream
</text>
</switch>
</g>
<rect x="520" y="310" width="144" height="60" fill="#d80073" stroke="#a50040" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 142px; height: 1px; padding-top: 340px; margin-left: 521px;">
<div data-drawio-colors="color: #ffffff; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 15px; font-family: Helvetica; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
SocketOutputStream
</div>
</div>
</div>
</foreignObject>
<text x="592" y="345" fill="#ffffff" font-family="Helvetica" font-size="15px" text-anchor="middle">
SocketOutputStream
</text>
</switch>
</g>
<rect x="0" y="0" width="660" height="60" fill="#dae8fc" stroke="#6c8ebf" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 658px; height: 1px; padding-top: 30px; margin-left: 1px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 23px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
其他代码
</div>
</div>
</div>
</foreignObject>
<text x="330" y="37" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="23px" text-anchor="middle">
其他代码
</text>
</switch>
</g>
<path d="M 433.5 380.5 L 443.5 380.5 L 443.5 430.5 L 454 430.5 L 438.5 449.5 L 423 430.5 L 433.5 430.5 Z" fill="#d80073" stroke="#a50040" stroke-linejoin="round" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 69.5 449.5 L 59.5 449.5 L 59.5 399.5 L 49 399.5 L 64.5 380.5 L 80 399.5 L 69.5 399.5 Z" fill="#008a00" stroke="#005700" stroke-linejoin="round" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 229.5 449.5 L 219.5 449.5 L 219.5 399.5 L 209 399.5 L 224.5 380.5 L 240 399.5 L 229.5 399.5 Z" fill="#008a00" stroke="#005700" stroke-linejoin="round" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 586.5 380.5 L 596.5 380.5 L 596.5 430.5 L 607 430.5 L 591.5 449.5 L 576 430.5 L 586.5 430.5 Z" fill="#d80073" stroke="#a50040" stroke-linejoin="round" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 69.5 298.5 L 59.5 298.5 L 59.5 248.5 L 49 248.5 L 64.5 229.5 L 80 248.5 L 69.5 248.5 Z" fill="#008a00" stroke="#005700" stroke-linejoin="round" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 229.5 298.5 L 219.5 298.5 L 219.5 248.5 L 209 248.5 L 224.5 229.5 L 240 248.5 L 229.5 248.5 Z" fill="#008a00" stroke="#005700" stroke-linejoin="round" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 585 229.5 L 595 229.5 L 595 279.5 L 605.5 279.5 L 590 298.5 L 574.5 279.5 L 585 279.5 Z" fill="#d80073" stroke="#a50040" stroke-linejoin="round" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 433.5 229.5 L 443.5 229.5 L 443.5 279.5 L 454 279.5 L 438.5 298.5 L 423 279.5 L 433.5 279.5 Z" fill="#d80073" stroke="#a50040" stroke-linejoin="round" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 149.5 138.5 L 139.5 138.5 L 139.5 88.5 L 129 88.5 L 144.5 69.5 L 160 88.5 L 149.5 88.5 Z" fill="#008a00" stroke="#005700" stroke-linejoin="round" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 499 69.5 L 509 69.5 L 509 119.5 L 519.5 119.5 L 504 138.5 L 488.5 119.5 L 499 119.5 Z" fill="#d80073" stroke="#a50040" stroke-linejoin="round" stroke-miterlimit="10" pointer-events="all"/>
<rect x="0" y="459" width="130" height="40" fill="#e1d5e7" stroke="#9673a6" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 128px; height: 1px; padding-top: 479px; margin-left: 1px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 23px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
文件
</div>
</div>
</div>
</foreignObject>
<text x="65" y="486" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="23px" text-anchor="middle">
文件
</text>
</switch>
</g>
<rect x="160" y="459" width="130" height="40" fill="#1ba1e2" stroke="#006eaf" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 128px; height: 1px; padding-top: 479px; margin-left: 161px;">
<div data-drawio-colors="color: #ffffff; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 23px; font-family: Helvetica; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
网络
</div>
</div>
</div>
</foreignObject>
<text x="225" y="486" fill="#ffffff" font-family="Helvetica" font-size="23px" text-anchor="middle">
网络
</text>
</switch>
</g>
<rect x="374" y="459" width="130" height="40" fill="#e1d5e7" stroke="#9673a6" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 128px; height: 1px; padding-top: 479px; margin-left: 375px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 23px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
文件
</div>
</div>
</div>
</foreignObject>
<text x="439" y="486" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="23px" text-anchor="middle">
文件
</text>
</switch>
</g>
<rect x="534" y="459" width="130" height="40" fill="#1ba1e2" stroke="#006eaf" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 128px; height: 1px; padding-top: 479px; margin-left: 535px;">
<div data-drawio-colors="color: #ffffff; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 23px; font-family: Helvetica; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
网络
</div>
</div>
</div>
</foreignObject>
<text x="599" y="486" fill="#ffffff" font-family="Helvetica" font-size="23px" text-anchor="middle">
网络
</text>
</switch>
</g>
</g>
<switch>
<g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/>
<a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank">
<text text-anchor="middle" font-size="10px" x="50%" y="100%">
Text is not SVG - cannot display
</text>
</a>
</switch>
</svg>

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 KiB

@ -0,0 +1,279 @@
<svg host="65bd71144e" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="651px" height="331px" viewBox="-0.5 -0.5 651 331" content="&lt;mxfile&gt;&lt;diagram id=&quot;sv2Wpp69pxSE8AizLORF&quot; name=&quot;第 1 页&quot;&gt;1ZpLc5swEIB/DdeOQeZ1jB9Je+ikMz40Paogg1qBPLKI7f76iiIZZNkxTjGQS0a7YkG7+yEt61hgnu2fGNykX2mMiOVM4r0FFpbjBL4t/paKQ6Xw/UmlSBiOK5VdK1b4D5JKdVmBY7TVLuSUEo43ujKieY4irukgY3SnX7amRH/qBibIUKwiSEztdxzzVLrl+LX+M8JJqp5se2E1k0F1sfRkm8KY7hoqsLTAnFHKq1G2nyNSxk7FpbJ7vDB7XBhDOW9j4FQGr5AU0rfnn7/KkFWr4wflMqNFHqPSamKB2S7FHK02MCpndyLHQpfyjAjJFkNzFXJhr4hxtG+o5KqeEM0QZwdxiZwFMkCSkGPAdnW8baVLG7FWdlCmODneuY6CGMhAXAiKa7iPYgGAFHOaI91f4SY7vDSFH2WgPokbSXmxl5GrpIOS9pi/NMaVmSul2qgUlM3F4G5pwSK5XiDfCsgSxLVUl568mQCGCOT4VUf9f8IJDMYsxyNiVTMsBkk5+JJvCr7iDMFMzYm7HqcHp9GZ6DjaoE8cvVtxfAdVlxD2ryHcCsfpiHCcXsfxueAfi0dg98ijHQ7I49UttRWPrskjGIpH1+DxEROk7YhDn8WeTpvf5+Y3Mdx/G7ZW+fe6TrY0/UaxeGodOOfk2Ji6+i0qAKXVSVCOy2gVJ+8cRRyxMXPU7ylqG/6/r6i7eiLerajzR7Rr+QZv1YfDqHkL++Rt+uF5C0zepkPxFlzgTS/VRgYc6PWkBB0B10mFFY6InfDC2Thudvos6dXX2AfueKhwjYI4tZiTon7UwDlun9+Qt7bY2jGgmsENBjov9Vu7qDJSM7CAHI6pQHJPC6RJnwjc3Na6a4vKdsbEjmOwMyvWa8RQ3Bk/a0zInBLK/tkCZMcu8oV+yxn9jRozoecD6N2JOK9P4oK7bDpneu3hYOCYzXYFTneHzyjIAdM+yfHvQs6Ztvhw5Jh98fK4GlXJcsqAE/RZI5stD2vpWcGDNVtYy8Ca2daDbS3dchCY9bRwkesB0V8XyVDz3ZIqSHCSCzESgUNCPysDhiNIHuREhuO4fMzZDOg56iAJxk+zZz5UvG5yIMT6p/CqKVr/PwFY/gU=&lt;/diagram&gt;&lt;/mxfile&gt;">
<defs/>
<g>
<rect x="0" y="150" width="120" height="30" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 165px; margin-left: 1px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
Object
</div>
</div>
</div>
</foreignObject>
<text x="60" y="169" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
Object
</text>
</switch>
</g>
<path d="M 170 75 L 123.3 152.05" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 120.58 156.54 L 121.21 148.74 L 123.3 152.05 L 127.2 152.37 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<rect x="170" y="60" width="120" height="30" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 75px; margin-left: 171px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
<i>
InputStream
</i>
</div>
</div>
</div>
</foreignObject>
<text x="230" y="79" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
InputStream
</text>
</switch>
</g>
<path d="M 170 255 L 123.3 177.95" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 120.58 173.46 L 127.2 177.63 L 123.3 177.95 L 121.21 181.26 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<rect x="170" y="240" width="120" height="30" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 255px; margin-left: 171px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
<i>
OutputStream
</i>
</div>
</div>
</div>
</foreignObject>
<text x="230" y="259" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
OutputStream
</text>
</switch>
</g>
<path d="M 330 15 L 293.86 62.43" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 290.68 66.61 L 292.14 58.92 L 293.86 62.43 L 297.7 63.16 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<rect x="330" y="0" width="120" height="30" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 15px; margin-left: 331px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
FileInputStream
</div>
</div>
</div>
</foreignObject>
<text x="390" y="19" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
FileInputStream
</text>
</switch>
</g>
<path d="M 330 75 L 296.37 75" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 291.12 75 L 298.12 71.5 L 296.37 75 L 298.12 78.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<rect x="330" y="60" width="120" height="30" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 75px; margin-left: 331px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
FilterInputStream
</div>
</div>
</div>
</foreignObject>
<text x="390" y="79" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
FilterInputStream
</text>
</switch>
</g>
<path d="M 330 135 L 293.86 87.57" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 290.68 83.39 L 297.7 86.84 L 293.86 87.57 L 292.14 91.08 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<rect x="330" y="120" width="120" height="30" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 135px; margin-left: 331px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
ObjectInputStream
</div>
</div>
</div>
</foreignObject>
<text x="390" y="139" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
ObjectInputStream
</text>
</switch>
</g>
<path d="M 330 315 L 293.86 267.57" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 290.68 263.39 L 297.7 266.84 L 293.86 267.57 L 292.14 271.08 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<rect x="330" y="300" width="120" height="30" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 315px; margin-left: 331px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
ObjectOutputStream
</div>
</div>
</div>
</foreignObject>
<text x="390" y="319" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
ObjectOutputStream
</text>
</switch>
</g>
<path d="M 330 255 L 296.37 255" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 291.12 255 L 298.12 251.5 L 296.37 255 L 298.12 258.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<rect x="330" y="240" width="120" height="30" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 255px; margin-left: 331px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
FilterOutputStream
</div>
</div>
</div>
</foreignObject>
<text x="390" y="259" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
FilterOutputStream
</text>
</switch>
</g>
<path d="M 330 195 L 293.86 242.43" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 290.68 246.61 L 292.14 238.92 L 293.86 242.43 L 297.7 243.16 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<rect x="330" y="180" width="120" height="30" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 195px; margin-left: 331px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
FileOutputStream
</div>
</div>
</div>
</foreignObject>
<text x="390" y="199" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
FileOutputStream
</text>
</switch>
</g>
<path d="M 530 54 L 456.3 65.06" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 451.11 65.83 L 457.51 61.33 L 456.3 65.06 L 458.55 68.26 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<rect x="530" y="30" width="120" height="30" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 45px; margin-left: 531px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
DataInputStream
</div>
</div>
</div>
</foreignObject>
<text x="590" y="49" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
DataInputStream
</text>
</switch>
</g>
<path d="M 530 95.36 L 456.29 83.51" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 451.1 82.68 L 458.57 80.33 L 456.29 83.51 L 457.46 87.24 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<rect x="530" y="90" width="120" height="30" fill="#e1d5e7" stroke="#9673a6" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 105px; margin-left: 531px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
BufferedInputStream
</div>
</div>
</div>
</foreignObject>
<text x="590" y="109" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
BufferedInputStream
</text>
</switch>
</g>
<path d="M 530 276 L 456.3 264.94" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 451.11 264.17 L 458.55 261.74 L 456.3 264.94 L 457.51 268.67 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<rect x="530" y="270" width="120" height="30" fill="#e1d5e7" stroke="#9673a6" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 285px; margin-left: 531px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
BufferedOutputStream
</div>
</div>
</div>
</foreignObject>
<text x="590" y="289" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
BufferedOutputStream
</text>
</switch>
</g>
<path d="M 530 234 L 456.3 245.06" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 451.11 245.83 L 457.51 241.33 L 456.3 245.06 L 458.55 248.26 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<rect x="530" y="210" width="120" height="30" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 225px; margin-left: 531px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
DataOutputStream
</div>
</div>
</div>
</foreignObject>
<text x="590" y="229" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
DataOutputStream
</text>
</switch>
</g>
<rect x="200" y="140" width="60" height="30" fill="none" stroke="none" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 155px; margin-left: 201px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
抽象层
</div>
</div>
</div>
</foreignObject>
<text x="230" y="159" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
抽象层
</text>
</switch>
</g>
</g>
<switch>
<g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/>
<a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank">
<text text-anchor="middle" font-size="10px" x="50%" y="100%">
Text is not SVG - cannot display
</text>
</a>
</switch>
</svg>

After

Width:  |  Height:  |  Size: 24 KiB

Loading…
Cancel
Save