diff --git a/gui/src/main/java/cn/octopusyan/alistgui/manager/http/HttpUtil.java b/gui/src/main/java/cn/octopusyan/alistgui/manager/http/HttpUtil.java index 10fb04e..bec3d26 100644 --- a/gui/src/main/java/cn/octopusyan/alistgui/manager/http/HttpUtil.java +++ b/gui/src/main/java/cn/octopusyan/alistgui/manager/http/HttpUtil.java @@ -1,7 +1,7 @@ package cn.octopusyan.alistgui.manager.http; import cn.octopusyan.alistgui.enums.ProxySetup; -import cn.octopusyan.alistgui.manager.http.handler.BodyHandler; +import cn.octopusyan.alistgui.manager.http.handler.DownloadBodyHandler; import cn.octopusyan.alistgui.model.ProxyInfo; import cn.octopusyan.alistgui.util.JsonUtil; import com.fasterxml.jackson.databind.JsonNode; @@ -126,7 +126,7 @@ public class HttpUtil { } // 下载处理器 - var handler = BodyHandler.create( + var handler = DownloadBodyHandler.create( Path.of(savePath), StandardOpenOption.CREATE, StandardOpenOption.WRITE ); diff --git a/gui/src/main/java/cn/octopusyan/alistgui/manager/http/handler/BodyHandler.java b/gui/src/main/java/cn/octopusyan/alistgui/manager/http/handler/DownloadBodyHandler.java similarity index 89% rename from gui/src/main/java/cn/octopusyan/alistgui/manager/http/handler/BodyHandler.java rename to gui/src/main/java/cn/octopusyan/alistgui/manager/http/handler/DownloadBodyHandler.java index 913aa6c..dd22306 100644 --- a/gui/src/main/java/cn/octopusyan/alistgui/manager/http/handler/BodyHandler.java +++ b/gui/src/main/java/cn/octopusyan/alistgui/manager/http/handler/DownloadBodyHandler.java @@ -21,16 +21,16 @@ import java.util.function.Consumer; * @author octopus_yan */ @Slf4j -public class BodyHandler implements HttpResponse.BodyHandler { +public class DownloadBodyHandler implements HttpResponse.BodyHandler { private final HttpResponse.BodyHandler handler; private BiConsumer consumer; - private BodyHandler(HttpResponse.BodyHandler handler) { + private DownloadBodyHandler(HttpResponse.BodyHandler handler) { this.handler = handler; } - public static BodyHandler create(Path directory, OpenOption... openOptions) { - return new BodyHandler(HttpResponse.BodyHandlers.ofFileDownload(directory, openOptions)); + public static DownloadBodyHandler create(Path directory, OpenOption... openOptions) { + return new DownloadBodyHandler(HttpResponse.BodyHandlers.ofFileDownload(directory, openOptions)); } @Override