View Single Post
  #2 (permalink)  
Old 01-13-2009, 02:31 AM
neilcoffey neilcoffey is offline
Senior Member
 
Join Date: Nov 2008
Posts: 275
Rep Power: 2
neilcoffey is on a distinguished road
Default
Essentially, you:
- construct a URL with your URL
- call openConnection(), then call getInputStream() on the resulting URLConnection object
- pull out the data from the input stream as with any old input stream, probably wrapping a BufferedInputStream around it

A while ago I put up on my web site an example of reading data from a URL in Java, which covers this case of binary data, plus the case of reading character data.
__________________
Neil Coffey
Javamex - Java tutorials and performance info
Reply With Quote