v0.0.3
All checks were successful
CI/CD / build-deploy (pull_request) Successful in 40s

This commit is contained in:
Timi
2026-03-21 18:14:57 +08:00
parent 82a48bd1d2
commit 33177f5ded
4 changed files with 52 additions and 41 deletions

View File

@@ -4,6 +4,8 @@ package com.imyeyu.io;
import com.imyeyu.java.TimiJava;
import com.imyeyu.java.bean.CallbackArg;
import com.imyeyu.utils.Calc;
import lombok.Getter;
import lombok.Setter;
import java.util.ArrayList;
import java.util.HashMap;
@@ -41,9 +43,18 @@ public class IOSpeedService {
private static IOSpeedService service;
/** 加盐,用于在数据对齐的 IO 流中看起来像非对齐传输。此操作会使计算数据变得非真实,仅作为 UI 显示时可使用 */
@Setter
@Getter
private long salt;
private Timer timer;
private double totalBufferOld, totalBuffer;
private double totalBufferOld;
/** 总缓冲量 */
@Getter
private double totalBuffer;
/** true 为运行中 */
@Getter
private boolean isRunning;
private final Map<String, Item> items;
@@ -136,15 +147,6 @@ public class IOSpeedService {
return items.get(id);
}
/**
* 获取总缓冲量
*
* @return 缓冲数据量
*/
public double getTotalBuffer() {
return totalBuffer;
}
/** 重置计算 */
public void reset() {
totalBufferOld = totalBuffer = 0;
@@ -172,23 +174,6 @@ public class IOSpeedService {
return service;
}
/**
* 是否运行中
*
* @return true 为运行中
*/
public boolean isRunning() {
return isRunning;
}
public long getSalt() {
return salt;
}
public void setSalt(long salt) {
this.salt = salt;
}
/**
* 添加全局字节量监听
*

View File

@@ -1,5 +1,7 @@
package com.imyeyu.io;
import lombok.Getter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
@@ -16,8 +18,10 @@ import java.util.jar.JarFile;
* @author 夜雨
* @version 2021-12-01 17:39
*/
@Getter
public class JarReader extends JarFile {
/** jar 所有文件的数据流映射列表Map&lt;路径, 数据流&gt; */
private final Map<String, InputStream> files;
/**
@@ -76,12 +80,4 @@ public class JarReader extends JarFile {
return IO.toBytes(getInputStream(path));
}
/**
* 获取 jar 所有文件的数据流映射列表Map&lt;路径, 数据流&gt;
*
* @return 数据流映射列表
*/
public Map<String, InputStream> getFiles() {
return files;
}
}

View File

@@ -1,6 +1,7 @@
package com.imyeyu.io;
import com.imyeyu.java.TimiJava;
import lombok.Getter;
import java.io.File;
import java.util.ArrayList;
@@ -11,6 +12,7 @@ import java.util.Stack;
* @author 夜雨
* @version 2024-06-30 16:26
*/
@Getter
public class TreeFile extends File {
private List<TreeFile> children;
@@ -57,10 +59,6 @@ public class TreeFile extends File {
}
}
public List<TreeFile> getChildren() {
return children;
}
/**
*
*