Here you can find the source of openURL(String url)
Parameter | Description |
---|---|
url | the url |
public static InputStream openURL(String url)
//package com.java2s; //License from project: Open Source License import java.io.InputStream; import java.net.URL; public class Main { public static final String BIOPORTAL_OPTIONS = "&format=xml&display_links=false"; /**// w ww . ja v a 2 s .c o m * open stream from URL. * * @param url the url * @return null if invalid url */ public static InputStream openURL(String url) { try { return new URL(url + BIOPORTAL_OPTIONS).openStream(); } catch (Exception ex) { //COULD NOT OPEN } return null; } }