- public Res url2res(String url) throws JSExn {
- if (url.startsWith("http://")) return new Res.HTTP(url);
- else if (url.startsWith("https://")) return new Res.HTTP(url);
- else if (url.startsWith("data:")) return new Res.ByteArray(Base64.decode(url.substring(5)), null);
- else if (url.startsWith("utf8:")) return new Res.ByteArray(url.substring(5).getBytes(), null);
+ public Stream url2res(String url) throws JSExn {
+ if (url.startsWith("http://")) return new Stream.HTTP(url);
+ else if (url.startsWith("https://")) return new Stream.HTTP(url);
+ else if (url.startsWith("data:")) return new Stream.ByteArray(Base64.decode(url.substring(5)), null);
+ else if (url.startsWith("utf8:")) return new Stream.ByteArray(url.substring(5).getBytes(), null);