aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/customurl/DGURLConnection.java
diff options
context:
space:
mode:
authorsyeyoung <42869671+cyoung06@users.noreply.github.com>2020-12-13 22:05:09 +0900
committersyeyoung <42869671+cyoung06@users.noreply.github.com>2020-12-13 22:05:09 +0900
commit84a71ed7bc03afbdfab00100b780117de354c83b (patch)
treeb74a005c5c3df99d3a23e70c9a1ed1159705dee4 /src/main/java/kr/syeyoung/dungeonsguide/customurl/DGURLConnection.java
parent2b869989ec69bfb0f5ca54409844ec5720b6a6fd (diff)
downloadSkyblock-Dungeons-Guide-84a71ed7bc03afbdfab00100b780117de354c83b.tar.gz
Skyblock-Dungeons-Guide-84a71ed7bc03afbdfab00100b780117de354c83b.tar.bz2
Skyblock-Dungeons-Guide-84a71ed7bc03afbdfab00100b780117de354c83b.zip
semi-obfuscate
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/customurl/DGURLConnection.java')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/customurl/DGURLConnection.java42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/customurl/DGURLConnection.java b/src/main/java/kr/syeyoung/dungeonsguide/customurl/DGURLConnection.java
deleted file mode 100644
index 06aec0d8..00000000
--- a/src/main/java/kr/syeyoung/dungeonsguide/customurl/DGURLConnection.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package kr.syeyoung.dungeonsguide.customurl;
-
-import kr.syeyoung.dungeonsguide.Authenticator;
-import kr.syeyoung.dungeonsguide.DungeonsGuideMain;
-import lombok.SneakyThrows;
-import net.minecraft.launchwrapper.LaunchClassLoader;
-
-import javax.crypto.Cipher;
-import javax.crypto.CipherInputStream;
-import javax.crypto.spec.IvParameterSpec;
-import javax.crypto.spec.SecretKeySpec;
-import java.io.*;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.net.URLConnection;
-import java.net.URLEncoder;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Set;
-
-public class DGURLConnection extends URLConnection {
- private Authenticator authenticator;
- protected DGURLConnection(URL url, Authenticator authenticator) {
- super(url);
- connected = false;
- this.authenticator = authenticator;
- }
-
- @Override
- public void connect() throws IOException {
- }
- @Override
- public InputStream getInputStream() throws IOException {
- if (authenticator != null) {
- String path = url.getPath().substring(1);
- if (!authenticator.getDynamicResources().containsKey(path)) throw new FileNotFoundException();
- return new ByteArrayInputStream(authenticator.getDynamicResources().get(path));
- } else {
- return DGURLConnection.class.getResourceAsStream(url.getPath());
- }
- }
-}