org.granite.util
Class URIUtil
java.lang.Object
org.granite.util.URIUtil
public class URIUtil
- extends Object
- Author:
- Franck WOLFF
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CLASSPATH_SCHEME
public static final String CLASSPATH_SCHEME
- See Also:
- Constant Field Values
FILE_SCHEME
public static final String FILE_SCHEME
- See Also:
- Constant Field Values
WINDOWS_DRIVE_PATTERN
public static final Pattern WINDOWS_DRIVE_PATTERN
URIUtil
public URIUtil()
normalize
public static String normalize(String uri)
isFileURI
public static boolean isFileURI(String path)
throws URISyntaxException
- Throws:
URISyntaxException
isFileURI
public static boolean isFileURI(URI uri)
isAbsolute
public static boolean isAbsolute(String path)
throws URISyntaxException
- Throws:
URISyntaxException
isAbsolute
public static boolean isAbsolute(URI uri)
getSchemeSpecificPart
public static String getSchemeSpecificPart(String path)
throws URISyntaxException
- Throws:
URISyntaxException
getSchemeSpecificPart
public static String getSchemeSpecificPart(URI uri)
getInputStream
public static InputStream getInputStream(URI uri,
ClassLoader loader)
throws IOException
- Throws:
IOException
getInputStream
public static InputStream getInputStream(URI uri)
throws IOException
- Throws:
IOException
getContentAsString
public static String getContentAsString(URI uri)
throws IOException
- Throws:
IOException
getContentAsString
public static String getContentAsString(URI uri,
Charset charset)
throws IOException
- Throws:
IOException
getContentAsBytes
public static byte[] getContentAsBytes(URI uri)
throws IOException
- Throws:
IOException
lastModified
public static long lastModified(URI uri)
throws IOException
- Throws:
IOException
lastModified
public static long lastModified(URL url)
throws IOException
- Throws:
IOException