public class StreamHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
BUFFER_SIZE |
static String |
UTF8 |
| Constructor and Description |
|---|
StreamHelper() |
| Modifier and Type | Method and Description |
|---|---|
ByteArrayOutputStream |
readFully(InputStream inputStream) |
byte[] |
readFullyAsBytes(InputStream inputStream) |
String |
readFullyAsString(File file,
String encoding) |
String |
readFullyAsString(InputStream inputStream,
String encoding) |
String |
readFullyAsUTF8String(File file) |
String |
readFullyAsUTF8String(InputStream inputStream) |
public static final int BUFFER_SIZE
public static final String UTF8
public ByteArrayOutputStream readFully(InputStream inputStream) throws IOException
IOExceptionpublic byte[] readFullyAsBytes(InputStream inputStream) throws IOException
IOExceptionpublic String readFullyAsString(InputStream inputStream, String encoding) throws IOException
IOExceptionpublic String readFullyAsUTF8String(InputStream inputStream) throws IOException
IOExceptionpublic String readFullyAsUTF8String(File file) throws IOException
IOExceptionpublic String readFullyAsString(File file, String encoding) throws IOException
IOExceptionCopyright © 2017. All rights reserved.