This commit is contained in:
Looly
2023-03-13 12:22:51 +08:00
parent 1ad628f944
commit c1a895bce5
24 changed files with 60 additions and 37 deletions

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>cn.hutool</groupId>
<artifactId>hutool-parent</artifactId>
<version>6.0.0.M1</version>
<version>6.0.0.M2</version>
</parent>
<artifactId>hutool-core</artifactId>

View File

@@ -48,15 +48,15 @@ public class SyncInputStream extends FilterInputStream {
/**
* 同步数据到内存
* @return this
*/
public void sync() {
if (false == asyncFlag) {
// 已经是同步模式
return;
public SyncInputStream sync() {
if (asyncFlag) {
this.in = new ByteArrayInputStream(readBytes());
this.asyncFlag = false;
}
this.in = new ByteArrayInputStream(readBytes());
this.asyncFlag = false;
return this;
}
/**