|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.ontopia.utils.StreamUtils
public class StreamUtils
INTERNAL: Utilities for working with streams and readers.
Constructor Summary | |
---|---|
StreamUtils()
|
Method Summary | |
---|---|
static boolean |
compare(java.io.InputStream r1,
java.io.InputStream r2)
INTERNAL: Compares the contents of the two InputStreams for equality. |
static boolean |
compare(java.io.Reader r1,
java.io.Reader r2)
INTERNAL: Compares the contents of the two Readers for equality. |
static boolean |
compareAndClose(java.io.InputStream r1,
java.io.InputStream r2)
INTERNAL: Compares the contents of the two InputStream for equality and closes them afterwards. |
static java.io.InputStream |
getInputStream(java.io.File basedir,
java.lang.String name)
INTERNAL: Returns an input stream for the given url. |
static java.io.InputStream |
getInputStream(java.lang.String name)
INTERNAL: Same as getInputStream(null, name); |
static java.net.URL |
getResource(java.lang.String name)
INTERNAL: Returns an input stream for the given url. |
static byte[] |
read(java.io.InputStream in)
INTERNAL: Returns the entire contents of a stream as a byte array. |
static byte[] |
read(java.io.InputStream in,
int length)
INTERNAL: Returns the first given number of bytes of a stream into a byte array. |
static java.lang.String |
read(java.io.Reader in)
INTERNAL: Returns the entire contents of a stream (well, Reader) as a string. |
static java.lang.String |
readString(java.io.Reader r,
long length)
|
static void |
transfer(java.io.InputStream in,
java.io.OutputStream out)
INTERNAL: Transfers the entire contents of the InputStream to the OutputStream without modifying them in any way. |
static void |
transfer(java.io.Reader in,
java.io.Writer out)
INTERNAL: Transfers the entire contents of the Reader to the Writer without modifying them in any way. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StreamUtils()
Method Detail |
---|
public static void transfer(java.io.InputStream in, java.io.OutputStream out) throws java.io.IOException
java.io.IOException
public static void transfer(java.io.Reader in, java.io.Writer out) throws java.io.IOException
java.io.IOException
public static java.lang.String read(java.io.Reader in) throws java.io.IOException
java.io.IOException
public static byte[] read(java.io.InputStream in, int length) throws java.io.IOException
java.io.IOException
public static byte[] read(java.io.InputStream in) throws java.io.IOException
java.io.IOException
public static boolean compare(java.io.InputStream r1, java.io.InputStream r2) throws java.io.IOException
java.io.IOException
public static boolean compareAndClose(java.io.InputStream r1, java.io.InputStream r2) throws java.io.IOException
java.io.IOException
public static boolean compare(java.io.Reader r1, java.io.Reader r2) throws java.io.IOException
java.io.IOException
public static java.io.InputStream getInputStream(java.lang.String name) throws java.io.IOException
java.io.IOException
public static java.io.InputStream getInputStream(java.io.File basedir, java.lang.String name) throws java.io.IOException
java.io.IOException
public static java.net.URL getResource(java.lang.String name) throws java.io.IOException
java.io.IOException
public static java.lang.String readString(java.io.Reader r, long length) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |