InputStream from a URI?

Hi,

I have a URI to a resource, which is reality represents a zip file on the web, and I want to read it using InputStream. Should I use Http classes?

Thank you.
LVL 1
kerznerAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
objectsConnect With a Mentor Commented:
Use the URL class
0
 
Thomas4019Connect With a Mentor Commented:
Here's how i would do it.
URI uri = .... ;
InputStream is = uri.toURL().openStream();

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.