*
* @return A CoreInputStream object enclosing the opened input streams.
*/
@SupportsOption(options = {OnFailure.class})
public CoreInputStream input(Option ... options) {
final Options options$ = Options.$(this.commonCore, options);
return new CoreInputStream(this.commonCore, map(new F1<URI, InputStream>() {
public InputStream f(URI x) {
try {
final URL url = x.toURL();
final InputStream openStream = url.openStream();
return openStream;
} catch (MalformedURLException e) {
options$.failure(x, e, "input:urimalformed", "Malformed URI.");
} catch (IOException e) {
options$.failure(x, e, "input:ioerror", "Error opening the URI.");
}
return null;
}
}).array(InputStream.class));