public class StreamUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
closeStream(java.io.Closeable stream) |
static java.lang.String |
convertSeparators(java.lang.String s) |
static int |
copyStreamContent(java.io.InputStream inputStream,
java.io.OutputStream outputStream)
Copy stream.
|
static byte [] |
loadFromStream(java.io.InputStream inputStream) |
static java.lang.String |
readText(java.io.InputStream inputStream)
Deprecated.
depends on the default encoding, use StreamUtil#readText(java.io.InputStream, String) instead
|
static java.lang.String |
readText(java.io.InputStream inputStream,
java.nio.charset.Charset encoding) |
static java.lang.String |
readText(java.io.InputStream inputStream,
java.lang.String encoding) |
static char [] |
readTextAndConvertSeparators(java.io.Reader reader) |
static java.lang.String |
readTextFrom(java.io.Reader reader) |
public static int copyStreamContent(java.io.InputStream inputStream, java.io.OutputStream outputStream) throws java.io.IOException
inputStream
- source streamoutputStream
- destination streamjava.io.IOException
public static byte [] loadFromStream(java.io.InputStream inputStream) throws java.io.IOException
java.io.IOException
@Deprecated public static java.lang.String readText(java.io.InputStream inputStream) throws java.io.IOException
java.io.IOException
public static java.lang.String readText(java.io.InputStream inputStream, java.lang.String encoding) throws java.io.IOException
java.io.IOException
public static java.lang.String readText(java.io.InputStream inputStream, java.nio.charset.Charset encoding) throws java.io.IOException
java.io.IOException
public static java.lang.String convertSeparators(java.lang.String s)
public static char [] readTextAndConvertSeparators(java.io.Reader reader) throws java.io.IOException
java.io.IOException
public static java.lang.String readTextFrom(java.io.Reader reader) throws java.io.IOException
java.io.IOException
public static void closeStream(java.io.Closeable stream)