org.tigris.gef.util
Class Util

java.lang.Object
  extended by org.tigris.gef.util.Util

public class Util
extends java.lang.Object

Author:
Piotr Kaminski

Method Summary
static java.net.URL exchangeURLExtension(java.net.URL url, java.lang.String desiredExtension, java.lang.String oldExtension)
           
static java.lang.String filenameToURI(java.lang.String str)
          Fixes a platform dependent filename to standard URI form.
static java.net.URL fileToURL(java.io.File file)
           
static java.net.URL fixURLExtension(java.net.URL url, java.lang.String desiredExtension)
           
static java.lang.String stripJunk(java.lang.String s)
           
static java.lang.String URIToFilename(java.lang.String str)
          Fixes a platform dependent filename to standard URI form.
static java.io.File URLToFile(java.net.URL url)
           
static java.lang.String URLToShortName(java.net.URL url)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

filenameToURI

public static final java.lang.String filenameToURI(java.lang.String str)
Fixes a platform dependent filename to standard URI form.

Parameters:
str - The string to fix.
Returns:
Returns the fixed URI string.

fileToURL

public static final java.net.URL fileToURL(java.io.File file)
                                    throws java.net.MalformedURLException,
                                           java.io.IOException
Throws:
java.net.MalformedURLException
java.io.IOException

fixURLExtension

public static final java.net.URL fixURLExtension(java.net.URL url,
                                                 java.lang.String desiredExtension)

exchangeURLExtension

public static final java.net.URL exchangeURLExtension(java.net.URL url,
                                                      java.lang.String desiredExtension,
                                                      java.lang.String oldExtension)

stripJunk

public static final java.lang.String stripJunk(java.lang.String s)

URIToFilename

public static final java.lang.String URIToFilename(java.lang.String str)
Fixes a platform dependent filename to standard URI form.

Parameters:
str - The string to fix.
Returns:
Returns the fixed URI string.

URLToFile

public static final java.io.File URLToFile(java.net.URL url)
                                    throws java.net.MalformedURLException
Throws:
java.net.MalformedURLException

URLToShortName

public static final java.lang.String URLToShortName(java.net.URL url)