blob: 5bb53dcd2ef351a7919992c1aad3ebf848987d27 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
package org.apache.tuscany.sca.android;
import java.net.URLStreamHandler;
import java.net.URLStreamHandlerFactory;
public class DexURLStreamHandlerFactory implements URLStreamHandlerFactory {
private static DexURLStreamHandlerFactory instance;
public static DexURLStreamHandlerFactory getInstance() {
if (instance == null) {
instance = new DexURLStreamHandlerFactory();
}
return instance;
}
public DexURLStreamHandlerFactory() {}
public URLStreamHandler createURLStreamHandler(String protocol) {
URLStreamHandler urlStreamHandler = null;
if ("dex".equals(protocol)) {
urlStreamHandler = new DexURLStreamHandler();
}
return urlStreamHandler;
}
}
|