mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-02-20 05:58:30 +00:00
Small net update
This commit is contained in:
parent
036b5acf42
commit
0c7a95bdf6
@ -15,10 +15,9 @@ import java.io.FileOutputStream;
|
|||||||
import java.io.FilterInputStream;
|
import java.io.FilterInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.io.Reader;
|
|
||||||
import java.net.HttpURLConnection;
|
import java.net.HttpURLConnection;
|
||||||
|
import java.util.Scanner;
|
||||||
import java.util.concurrent.Executor;
|
import java.util.concurrent.Executor;
|
||||||
|
|
||||||
public class Request implements Closeable {
|
public class Request implements Closeable {
|
||||||
@ -192,15 +191,10 @@ public class Request implements Closeable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String dlString() throws IOException {
|
private String dlString() throws IOException {
|
||||||
StringBuilder builder = new StringBuilder();
|
try (Scanner s = new Scanner(getInputStream(), "UTF-8")) {
|
||||||
try (Reader reader = new InputStreamReader(getInputStream())) {
|
s.useDelimiter("\\A");
|
||||||
int len;
|
return s.next();
|
||||||
char[] buf = new char[4096];
|
|
||||||
while ((len = reader.read(buf)) != -1) {
|
|
||||||
builder.append(buf, 0, len);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return builder.toString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private JSONObject dlJSONObject() throws IOException, JSONException {
|
private JSONObject dlJSONObject() throws IOException, JSONException {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user