public class StreamHelper extends Object
Constructor and Description |
---|
StreamHelper() |
Modifier and Type | Method and Description |
---|---|
static void |
copyTo(InputStream source,
OutputStream destination)
Copies content of one stream to another.
|
static void |
copyTo(InputStream source,
OutputStream destination,
int bufferSize)
Copies content of one stream to another.
|
static byte[] |
readAsBytes(InputStream input)
Reads stream content as bytes.
|
static String |
toString(InputStream input)
Reads stream content as string.
|
public static void copyTo(InputStream source, OutputStream destination) throws IOException
source
- The source.destination
- The destination.IOException
public static void copyTo(InputStream source, OutputStream destination, int bufferSize) throws IOException
source
- The source.destination
- The destination.bufferSize
- Size of the buffer.IOException
public static byte[] readAsBytes(InputStream input) throws IOException
input
- The input.IOException
public static String toString(InputStream input) throws IOException
input
- The input.IOException
Copyright © 2019 Aspose Pty Ltd. All rights reserved.