Reading Data from a URL
The openStream() method connects to the server specified in the URL and returns an InputStream object fed by the data from that connection.
public final InputStream openStream() throws IOException
Any headers that precede the actual data are stripped off before the stream is opened.
Network connections are less reliable and slower than files. Buffer with a BufferedInputStream or a BufferedReader.
Back to first slide
View graphic version