四虎影院 v4.1.6版本的 MD5 值为:3c86dc44d368396917a29935d39af88b
以下内容为反编译后的 g.java 源代码,内容仅作参考
package q.c.a.p.f;
import java.io.OutputStream;
import java.net.ProtocolException;
import java.net.Proxy;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLStreamHandler;
import java.net.URLStreamHandlerFactory;
import java.util.logging.Logger;
import sun.net.www.protocol.http.Handler;
import sun.net.www.protocol.http.HttpURLConnection;
public class g implements URLStreamHandlerFactory {
public static final Logger a = Logger.getLogger(g.class.getName());
public class a extends Handler {
public a() {
}
public URLConnection a(URL url) {
return a(url, null);
}
public URLConnection a(URL url, Proxy proxy) {
return new b(url, this);
}
}
public static class b extends HttpURLConnection {
public static final String[] a = {"GET", "POST", "HEAD", "OPTIONS", "PUT", "DELETE", "SUBSCRIBE", "UNSUBSCRIBE", "NOTIFY"};
public b(URL url, Handler handler) {
super(url, handler);
}
public synchronized OutputStream a() {
OutputStream outputStream;
String str = this.method;
if (!this.method.equals("PUT") && !this.method.equals("POST") && !this.method.equals("NOTIFY")) {
this.method = "GET";
outputStream = super.getOutputStream();
this.method = str;
}
this.method = "PUT";
outputStream = super.getOutputStream();
this.method = str;
return outputStream;
}
public b(URL url, String str, int i2) {
super(url, str, i2);
}
public void a(String str) {
if (!this.connected) {
for (String str2 : a) {
if (str2.equals(str)) {
this.method = str;
return;
}
}
throw new ProtocolException("Invalid UPnP HTTP method: " + str);
}
throw new ProtocolException("Cannot reset method once connected");
}
}
@Override
public URLStreamHandler createURLStreamHandler(String str) {
a.fine("Creating new URLStreamHandler for protocol: " + str);
if ("http".equals(str)) {
return new a();
}
return null;
}
}