|
OCPsoft Common API 1.0.5.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ocpsoft.common.util.Streams
public final class Streams
Utility methods for working with InputStream and OutputStream instances.
| Constructor Summary | |
|---|---|
Streams()
|
|
| Method Summary | |
|---|---|
static void |
closeQuietly(Closeable source)
Close the given Closeable without throwing exceptions on failure. |
static boolean |
copy(InputStream input,
OutputStream output)
Copy all contents from the InputStream to the OutputStream, using a buffer of size 2048. |
static boolean |
copy(InputStream input,
OutputStream output,
int bufferSize)
Copy all contents from the InputStream to the OutputStream, using a buffer of the given size. |
static InputStream |
fromString(String data)
Create an InputStream from the given String. |
static String |
toString(InputStream stream)
Return a String containing the contents of the given InputStream |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Streams()
| Method Detail |
|---|
public static boolean copy(InputStream input,
OutputStream output)
InputStream to the OutputStream, using a buffer of size 2048.
public static boolean copy(InputStream input,
OutputStream output,
int bufferSize)
InputStream to the OutputStream, using a buffer of the given size.
public static String toString(InputStream stream)
String containing the contents of the given InputStream
public static InputStream fromString(String data)
InputStream from the given String.
public static void closeQuietly(Closeable source)
Closeable without throwing exceptions on failure.
|
OCPsoft Common API 1.0.5.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||