com.integralblue.httpresponsecache.compat.URLStreamHandlerFactoryImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of httpresponsecache Show documentation
Show all versions of httpresponsecache Show documentation
An HTTP Response Cache for java.net.URL
The newest version!
package com.integralblue.httpresponsecache.compat;
import java.net.URLStreamHandler;
import java.net.URLStreamHandlerFactory;
import libcore.net.http.HttpHandler;
import libcore.net.http.HttpsHandler;
public class URLStreamHandlerFactoryImpl implements URLStreamHandlerFactory {
public URLStreamHandler createURLStreamHandler(String protocol) {
if (protocol.equals("http")) {
return new HttpHandler();
} else if (protocol.equals("https")) {
return new HttpsHandler();
}
return null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy