public class StreamUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
(package private) static int |
BUFFER_SIZE |
| Constructor and Description |
|---|
StreamUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
copyStreamContent(InputStream is,
OutputStream os,
boolean closeIs,
boolean closeOs)
Kopiert einen Inputstream in einen Outputstream.
|
static void |
copyStreamContent(InputStream is,
OutputStream os,
boolean closeIs,
boolean closeOs,
boolean autoFlush)
Kopiert einen Inputstream in einen Outputstream.
|
static void |
copyStreamContent(InputStream is,
OutputStream os,
boolean closeIs,
boolean closeOs,
String encoding)
Kopiert einen Inputstream in einen Outputstream.
|
static byte[] |
readInputStream(InputStream is)
Liest einen Inputstream in ein Bytearray
|
static String |
readInputStreamToString(InputStream is,
String encoding)
Liest einen Inputstream in ein Bytearray
|
static final int BUFFER_SIZE
public static void copyStreamContent(InputStream is, OutputStream os, boolean closeIs, boolean closeOs, String encoding) throws Exception
is - Inputstreamos - OutputstreamcloseIs - Inputstream nach dem Kopieren schließen?closeOs - Outputstream nach dem Kopieren schließen?encoding - verwendet Encoding zum Lesen des InputstreamsExceptionpublic static void copyStreamContent(InputStream is, OutputStream os, boolean closeIs, boolean closeOs) throws Exception
is - Inputstreamos - OutputstreamcloseIs - Inputstream nach dem Kopieren schließen?closeOs - Outputstream nach dem Kopieren schließen?Exceptionpublic static void copyStreamContent(InputStream is, OutputStream os, boolean closeIs, boolean closeOs, boolean autoFlush) throws Exception
is - Inputstreamos - OutputstreamcloseIs - Inputstream nach dem Kopieren schließen?closeOs - Outputstream nach dem Kopieren schließen?autoFlush - flush nach jedem Lesen eines Blockes auf dem Outputstream ausführen?Exceptionpublic static byte[] readInputStream(InputStream is) throws Exception
is - InputstreamExceptionpublic static String readInputStreamToString(InputStream is, String encoding) throws Exception
is - Inputstreamencoding - verwendet Encoding zum Lesen des InputstreamsExceptionCopyright © 2019. All rights reserved.