skyview.survey
Class Util

java.lang.Object
  extended by skyview.survey.Util

public class Util
extends java.lang.Object


Constructor Summary
Util()
           
 
Method Summary
static java.io.InputStream getResourceOrFile(java.lang.String name)
          Open a stream from a resource or a file.
static void getURL(java.lang.String url, java.lang.String file)
          Copy a URL to a local file
static java.lang.String replace(java.lang.String original, java.lang.String match, java.lang.String replace, boolean all)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

replace

public static java.lang.String replace(java.lang.String original,
                                       java.lang.String match,
                                       java.lang.String replace,
                                       boolean all)

getURL

public static void getURL(java.lang.String url,
                          java.lang.String file)
                   throws java.lang.Exception
Copy a URL to a local file

Throws:
java.lang.Exception

getResourceOrFile

public static java.io.InputStream getResourceOrFile(java.lang.String name)
                                             throws java.io.IOException
Open a stream from a resource or a file. If a file with the given name exists then return a stream from that file, otherwise try to open it as a system resource.

Parameters:
name - The name of the resource or file.
Throws:
java.io.IOException