|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsk.baka.tools.IOUtils
public final class IOUtils
Contains various I/O utility methods.
| Method Summary | |
|---|---|
static void |
closeQuietly(Closeable conn)
Closes given Closeable quietly. |
static long |
copy(InputStream in,
OutputStream out)
Reads given input stream fully and writes it to given output stream. |
static long |
copy(Reader in,
Writer out)
Reads given reader fully and writes it to given output stream. |
static String |
toString(InputStream in)
Reads given input stream fully and returns it as a string with platform-default encoding. |
static String |
toString(InputStream in,
String encoding)
Reads given input stream fully and returns it as a string with platform-default encoding. |
static String |
toString(Reader r)
Reads given input stream fully and returns it as a string with platform-default encoding. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void closeQuietly(Closeable conn)
Closeable quietly.
conn - the connection. Does nothing if null is passed
public static String toString(InputStream in)
throws IOException
in - the stream to read, always closed.
IOException - if reading fails.
public static String toString(InputStream in,
String encoding)
throws IOException
in - the stream to read, always closed.encoding - the encoding to use
IOException - if reading fails.
public static String toString(Reader r)
throws IOException
r - the reader to read, always closed.
IOException - if reading fails.
public static long copy(InputStream in,
OutputStream out)
throws IOException
in - the stream to read, always closed.out - the stream to write, always closed.
IOException - if copy fails.
public static long copy(Reader in,
Writer out)
throws IOException
in - the stream to read, always closed.out - the stream to write, always closed.
IOException - if copy fails.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||