Solved

InputStream from a URI?

Posted on 2009-07-12
3
1,691 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
ID: 24836555
Use the URL class
0
 
LVL 92

Assisted Solution

by:objects
objects earned 300 total points
ID: 24836559
0
 
LVL 17

Assisted Solution

by:Thomas4019
Thomas4019 earned 200 total points
ID: 24836686
Here's how i would do it.
URI uri = .... ;
InputStream is = uri.toURL().openStream();

Open in new window

0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
replace a word with other 1 44
javap bin 2 34
expectj telnet failing 5 35
eclipse apache tomcat admin console 52 96
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

776 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