Java Reference
In-Depth Information
You were shown that downloading to a binary file means making an exact copy of the
incoming data and is preferred when downloading images, audio, and other binary data.
Downloading a text file requires you to translate the incoming line breaks to the correct for-
mat for your operating system.
In this chapter you saw how to use the URL and InputStream classes to access web
pages. This is fine for simple requests; however for more complex requests you will need to
use the HttpURLConnection class. This class will be introduced in the next chapter.
Search WWH ::




Custom Search