We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1804fbe commit 7473296Copy full SHA for 7473296
change/datastructure/Reader4.java
@@ -0,0 +1,16 @@
1
+package change.datastructure;
2
+
3
+public class Reader4 {
4
+ public char[] cache = new char[4]; // 缓存数组
5
+ public int cacheStart = 0; // 缓存数组中未使用的起始位置
6
+ public int cacheLen = 0; // 缓存数组中未使用的字符个数
7
8
+ /**
9
+ * API read4 可以从文件中读取 4 个连续的字符,并且将它们写入缓存数组 buf 中。
10
+ * 返回值为实际读取的字符个数。
11
+ */
12
+ public int read4(char[] buf4) {
13
+ return 0; // 这里是为了演示而写的,具体实现需要根据具体场景而定
14
+ }
15
+}
16
0 commit comments