Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: joist/java/org/joist/util URL.java

Project highlights: Architectural Overview

joist
Discussion topic

Back to topic list

CVS update: joist/java/org/joist/util URL.java

Author commitlogger at hocus dot collab dot net
Full name commitlogger at hocus dot collab dot net
Date 2000-04-07 13:15:29 PDT
Message User: dlr
  Date: 00/04/07 13:15:29

  Modified: java/org/joist/util URL.java
  Log:
  Added functionality to determine whether a URL has an associated protocol. This functionality can be used to determine whether or not a URL is local or remote.
  
  Revision Changes Path
  1.4 +20 -1 joist/java/org/joist​/util/URL.java
  
  Index: URL.java
  ====================​====================​====================​=======
  RCS file: /cvs/joist/java/org/​joist/util/URL.java,​v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- URL.java 2000/02/29 01:23:59 1.3
  +++ URL.java 2000/04/07 20:15:28 1.4
  @@ -62,7 +62,7 @@
    * Parses and builds URLs
    *
    * @author David C. Pellegrini <A HREF="mailto:davidp@​dataweb-systems.com"​>davidp@dataweb-s​ystems.com</A>​
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    *
    * Copyright (c) 1999 dataweb systems, inc.
    * Copyright (c) 1999, 2000 Collab.Net, Inc.
  @@ -75,6 +75,25 @@
   
       /** Turn debug log output on/off */
       final static private boolean debug = false;
  +
  + /**
  + * Tests for inclusion of a protocol in the specified URL. Can be used to
  + * determine whether or not a URL is local.
  + *
  + * @param url A string representation of the URL to test.
  + * @return Whether the URL is local.
  + */
  + public static boolean hasProtocol (String url)
  + {
  + if (url != null)
  + {
  + return (url.indexOf("://") != -1);
  + }
  + else
  + {
  + return false;
  + }
  + }
   
       /**
        * Generates the leading part of the URL, up through the server

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

CVS update: joist/java/org/joist/util URL.java commitlogger at hocus dot collab dot net commitlogger at hocus dot collab dot net 2000-04-07 13:15:29 PDT
Messages per page: