public final InputStream openStream () throws IOException

Opens a connection to this URL and returns an InputStream for reading from that connection. This method is a shorthand for:

     openConnection().getInputStream()
 

Returns:  an input stream for reading from the URL connection.

Exceptions:
IOException    if an I/O exception occurs.

See also:
java.net.URL.openConnection(), java.net.URLConnection.getInputStream()