|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.extensions.surf.util.DataUtil
public class DataUtil
A collection of useful static methods for working with input and output streams.
| Constructor Summary | |
|---|---|
DataUtil()
|
|
| Method Summary | |
|---|---|
static void |
copyStream(InputStream input,
OutputStream output)
Copy stream. |
static int |
copyStream(InputStream in,
OutputStream out,
boolean closeStreams)
Copy stream. |
static ByteArrayOutputStream |
copyToByteArray(InputStream input,
boolean closeInputStream)
Copy to byte array. |
static String |
copyToString(InputStream input,
String encoding,
boolean closeInputStream)
Copy to string. |
static byte[] |
toByteArray(InputStream input)
To byte array. |
static byte[] |
toByteArray(InputStream input,
boolean closeStream)
To byte array. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DataUtil()
| Method Detail |
|---|
public static void copyStream(InputStream input,
OutputStream output)
throws IOException
input - the inputoutput - the output
IOException - Signals that an I/O exception has occurred.
public static int copyStream(InputStream in,
OutputStream out,
boolean closeStreams)
throws IOException
in - the inout - the outcloseStreams - the close streams
IOException - Signals that an I/O exception has occurred.
public static byte[] toByteArray(InputStream input)
throws IOException
input - the input
IOException - Signals that an I/O exception has occurred.
public static byte[] toByteArray(InputStream input,
boolean closeStream)
throws IOException
input - the inputcloseStream - the close stream
IOException - Signals that an I/O exception has occurred.
public static ByteArrayOutputStream copyToByteArray(InputStream input,
boolean closeInputStream)
throws IOException
input - the inputcloseInputStream - the close input stream
IOException - Signals that an I/O exception has occurred.
public static String copyToString(InputStream input,
String encoding,
boolean closeInputStream)
throws IOException
input - the inputcloseInputStream - the close input stream
IOException - Signals that an I/O exception has occurred.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||