Discussion Board
Current Forum:
Homework 5 - Parts 1 and 2
Date:
Fri Nov 9 2001 1:13 am
Author:
Abeles, Peter J. <
pja@andrew.cmu.edu
>
Subject:
java.net.URL - how it compares addresses
Because of how I am organizing my list of web pages I cant compare if two addresses are the same by using URL. But in the assigment it saids two addresses are equal if URL saids they are. So I'm trying to figure out URLs algorithem. from my tests this is true.
http://www.andrew.cmu.edu/foo
http://www.andrew.cmu.edu/foo
equal
http://www.andrew.cmu.edu/foo
http://www.andrew.cmu.edu/foo/
NOT equal
http://wWw.aNdRew.cMU.EDu/foo
http://www.andrew.cmu.edu/foo
equal
http://www.andrew.cmu.edu/foo
http://www.andrew.cmu.edu/FOO
NOT equal
any other intersting cases I might be missing? What I'm currently doing is basicly making the server all lower case and then comparing two strings for equality. Thanks.
- Peter
Current Thread Detail:
java.net.URL - how it compares addresses
Abeles, Peter J.
Fri Nov 9 2001 1:13 am
Re: java.net.URL - how it compares ...
Cipriani, Jason A.
Fri Nov 9 2001 12:16 pm