conversations-classic/src/main/java/eu/siacs/conversations/http/AesGcmURLStreamHandler.java

18 lines
474 B
Java
Raw Normal View History

2017-02-07 18:31:54 +00:00
package eu.siacs.conversations.http;
2017-02-07 18:32:12 +00:00
import java.io.IOException;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLStreamHandler;
2017-02-07 19:07:57 +00:00
public class AesGcmURLStreamHandler extends URLStreamHandler {
public static final String PROTOCOL_NAME = "aesgcm";
2017-02-07 18:32:12 +00:00
@Override
protected URLConnection openConnection(URL url) throws IOException {
2017-02-07 19:07:57 +00:00
return new URL("https"+url.toString().substring(url.getProtocol().length())).openConnection();
2017-02-07 18:32:12 +00:00
}
2017-02-07 18:31:54 +00:00
}