org.granite.util
Class StreamUtil

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

public class StreamUtil
extends Object

Author:
Franck WOLFF

Constructor Summary
StreamUtil()
           
 
Method Summary
static byte[] getResourceAsBytes(String path, ClassLoader loader)
           
static ByteArrayInputStream getResourceAsStream(String path, ClassLoader loader)
           
static String getResourceAsString(String path, ClassLoader loader)
           
static String getStreamAsString(InputStream is)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamUtil

public StreamUtil()
Method Detail

getResourceAsBytes

public static byte[] getResourceAsBytes(String path,
                                        ClassLoader loader)
                                 throws IOException
Throws:
IOException

getResourceAsStream

public static ByteArrayInputStream getResourceAsStream(String path,
                                                       ClassLoader loader)
                                                throws IOException
Throws:
IOException

getResourceAsString

public static String getResourceAsString(String path,
                                         ClassLoader loader)
                                  throws IOException
Throws:
IOException

getStreamAsString

public static String getStreamAsString(InputStream is)
                                throws IOException
Throws:
IOException