Solved

InputStream from a URI?

Posted on 2009-07-12
3
1,683 Views
Last Modified: 2012-05-07
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.
0
Comment
Question by:kerzner
  • 2
3 Comments
 
LVL 92

Accepted Solution

by:
objects earned 300 total points
Comment Utility
Use the URL class
0
 
LVL 92

Assisted Solution

by:objects
objects earned 300 total points
Comment Utility
0
 
LVL 17

Assisted Solution

by:Thomas4019
Thomas4019 earned 200 total points
Comment Utility
Here's how i would do it.
URI uri = .... ;

InputStream is = uri.toURL().openStream();

Open in new window

0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now