|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.ontopia.utils.URIUtils
public class URIUtils
INTERNAL: Utilities for working with URIs.
Constructor Summary | |
---|---|
URIUtils()
|
Method Summary | |
---|---|
static URILocator |
getFileURI(File file)
INTERNAL: Given a File object, produce a corresponding URILocator object in the file: URI scheme. |
static String |
getFileURIString(File file)
INTERNAL: Given a File object, produce a corresponding URI string object in the file: URI scheme. |
static URILocator |
getURI(String uri_or_filename)
INTERNAL: Turns a string containing a url or a filename into a proper LocatorIF object. |
static File |
getURIFile(LocatorIF file)
INTERNAL: Given a URILocator in the file: URI scheme, produce the corresponding File object. |
static URILocator |
getURILocator(String uri)
INTERNAL: Return URILocator from uri string. |
static String |
toHexString(byte n)
INTERNAL: Make hex string for integer. |
static URL |
toURL(File file)
INTERNAL: Use this method instead of File.toURL() to get URLs for files. |
static String |
urlEncode(String str,
String charenc)
INTERNAL: URL-encodes the string by encoding reserved characters using %-codes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public URIUtils()
Method Detail |
---|
public static URILocator getFileURI(File file)
public static String getFileURIString(File file)
public static File getURIFile(LocatorIF file) throws MalformedURLException
MalformedURLException
public static URILocator getURI(String uri_or_filename)
public static String urlEncode(String str, String charenc) throws IOException
str
- String to be URL-encoded.charenc
- Character encoding to use in URL. Usually UTF-8.
IOException
public static String toHexString(byte n)
public static URILocator getURILocator(String uri)
public static URL toURL(File file) throws MalformedURLException
MalformedURLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |