org.granite.util
Class URIUtil

java.lang.Object
  extended by org.granite.util.URIUtil

public class URIUtil
extends Object

Author:
Franck WOLFF

Field Summary
static String CLASSPATH_SCHEME
           
 
Constructor Summary
URIUtil()
           
 
Method Summary
static byte[] getContentAsBytes(URI uri)
           
static String getContentAsString(URI uri)
           
static String getContentAsString(URI uri, Charset charset)
           
static InputStream getInputStream(URI uri)
           
static InputStream getInputStream(URI uri, ClassLoader loader)
           
static long lastModified(URI uri)
           
static long lastModified(URL url)
           
static String normalize(String uri)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASSPATH_SCHEME

public static final String CLASSPATH_SCHEME
See Also:
Constant Field Values
Constructor Detail

URIUtil

public URIUtil()
Method Detail

normalize

public static String normalize(String 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