Java API has URL parsing ability?

Discussion in 'Java' started by taras.di@gmail.com, Aug 18, 2005.

  1. Guest

    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
    , Aug 18, 2005
    #1
    1. Advertising

  2. Roedy Green Guest

    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
    Roedy Green, Aug 18, 2005
    #2
    1. Advertising

  3. 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"
    Stefan Schulz, Aug 18, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?U2NhcmVjcm93?=

    Do asp.net have ability to access client CDRW/DVDRW?

    =?Utf-8?B?U2NhcmVjcm93?=, Jan 28, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    312
    Hermit Dave
    Jan 28, 2004
  2. Les Caudle
    Replies:
    0
    Views:
    600
    Les Caudle
    Mar 7, 2004
  3. Eric Caron

    Lost ability to debug projects

    Eric Caron, Jun 17, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    331
    Eric Caron
    Jun 17, 2005
  4. Replies:
    2
    Views:
    6,271
  5. george young

    need simple parsing ability

    george young, Jul 16, 2004, in forum: Python
    Replies:
    10
    Views:
    485
    Scott David Daniels
    Jul 16, 2004
Loading...

Share This Page