public class DataUtil extends Object
| Constructor and Description |
|---|
DataUtil() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public static void copyStream(InputStream input, OutputStream output) throws IOException
input - the inputoutput - the outputIOException - 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 streamsIOException - Signals that an I/O exception has occurred.public static byte[] toByteArray(InputStream input) throws IOException
input - the inputIOException - Signals that an I/O exception has occurred.public static byte[] toByteArray(InputStream input, boolean closeStream) throws IOException
input - the inputcloseStream - the close streamIOException - Signals that an I/O exception has occurred.public static ByteArrayOutputStream copyToByteArray(InputStream input, boolean closeInputStream) throws IOException
input - the inputcloseInputStream - the close input streamIOException - 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 streamIOException - Signals that an I/O exception has occurred.Copyright © 2005–2016 Alfresco Software. All rights reserved.