com.thaiopensource.util
Class UriOrFile

java.lang.Object
  extended by com.thaiopensource.util.UriOrFile

public class UriOrFile
extends Object


Constructor Summary
private UriOrFile()
           
 
Method Summary
static String fileToUri(File file)
           
static String fileToUri(String file)
           
private static boolean hasScheme(String str)
           
private static boolean isAlnum(char c)
           
private static boolean isAlpha(char c)
           
static void main(String[] args)
           
static String toUri(String uriOrFile)
           
static String uriToUriOrFile(String uri)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UriOrFile

private UriOrFile()
Method Detail

toUri

public static String toUri(String uriOrFile)

hasScheme

private static boolean hasScheme(String str)

isAlpha

private static boolean isAlpha(char c)

isAlnum

private static boolean isAlnum(char c)

fileToUri

public static String fileToUri(String file)
                        throws MalformedURLException
Throws:
MalformedURLException

fileToUri

public static String fileToUri(File file)
                        throws MalformedURLException
Throws:
MalformedURLException

uriToUriOrFile

public static String uriToUriOrFile(String uri)

main

public static void main(String[] args)