Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Java API has URL parsing ability?

Reply
Thread Tools

Java API has URL parsing ability?

 
 
taras.di@gmail.com
Guest
Posts: n/a
 
      08-18-2005
Hi all,

I was wondering if any Java API gurus out there know of any methods
that Java provides that parses a relative path in a URL - that is, it
removes all of the escape characters and replaces it with the proper
characters. I've looked at java.net.URI, but it seems to me that you
need to construct a URI in order to use the getPath() method - I
already have a get path method: I just need to parse the relative path.

Thanks in advance

Taras

 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      08-18-2005
On 17 Aug 2005 22:28:16 -0700, wrote or quoted :

>I was wondering if any Java API gurus out there know of any methods
>that Java provides that parses a relative path in a URL - that is, it
>removes all of the escape characters and replaces it with the proper
>characters.


You want to URLDecode first then check out URI URN URL

see http://mindprod.com/jgloss/urlencoded.html
 
Reply With Quote
 
 
 
 
Stefan Schulz
Guest
Posts: n/a
 
      08-18-2005
On Wed, 17 Aug 2005 22:28:16 -0700, taras.di wrote:

> Hi all,
>
> I was wondering if any Java API gurus out there know of any methods
> that Java provides that parses a relative path in a URL - that is, it
> removes all of the escape characters and replaces it with the proper
> characters. I've looked at java.net.URI, but it seems to me that you
> need to construct a URI in order to use the getPath() method - I
> already have a get path method: I just need to parse the relative path.


Assuming you mean you have a relative path to a file, look into file://
type URLs, they should, together with absolute paths, solve your problem.

--
You can't run away forever,
But there's nothing wrong with getting a good head start.
--- Jim Steinman, "Rock and Roll Dreams Come Through"


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
(extra) parsing (and verifying of) URL's via java.net.URI ... qwertmonkey@syberianoutpost.ru Java 4 10-23-2012 12:34 PM
URL encoding api in Java 1.4.2 Saju Pillai Java 28 01-29-2009 09:58 PM
does java has any api for tar and gzip? Nagesh Java 4 02-27-2006 11:17 AM
URL - substitution of a correct URL by a GUID like URL in favorites. Just D. ASP .Net Mobile 0 08-11-2004 04:26 PM
redirect URL's, return URL's, and URL Parameters Jon paugh ASP .Net 1 07-10-2004 05:29 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57