Class StreamHelper
- java.lang.Object
-
- com.aspose.cad.cloud.invoker.internal.StreamHelper
-
public class StreamHelper extends Object
Stream helper class
-
-
Constructor Summary
Constructors Constructor Description StreamHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Method Detail
-
copyTo
public static void copyTo(InputStream source, OutputStream destination) throws IOException
Copies content of one stream to another.- Parameters:
source
- The source.destination
- The destination.- Throws:
IOException
-
copyTo
public static void copyTo(InputStream source, OutputStream destination, int bufferSize) throws IOException
Copies content of one stream to another.- Parameters:
source
- The source.destination
- The destination.bufferSize
- Size of the buffer.- Throws:
IOException
-
readAsBytes
public static byte[] readAsBytes(InputStream input) throws IOException
Reads stream content as bytes.- Parameters:
input
- The input.- Returns:
- Stream content as bytes.
- Throws:
IOException
-
toString
public static String toString(InputStream input) throws IOException
Reads stream content as string.- Parameters:
input
- The input.- Returns:
- Stream content as string.
- Throws:
IOException
-
-