public class IOUtils extends Object
| Constructor and Description |
|---|
IOUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
readAll(InputStream inputStream,
Charset charset)
Read all stream byte data into
String |
static String |
readAll(InputStreamReader streamReader)
Read all chars into String
|
static void |
writeAll(String data,
OutputStream outputStream,
Charset charset)
Write string to byte stream
|
public static void writeAll(String data, OutputStream outputStream, Charset charset) throws IOException
data - Source stringoutputStream - Output streamcharset - Convert string to bytes according to given CharsetIOExceptionpublic static String readAll(InputStream inputStream, Charset charset) throws IOException
StringinputStream - Source streamcharset - Convert bytes to chars according to given CharsetString if there was no data in streamIOExceptionpublic static String readAll(InputStreamReader streamReader) throws IOException
streamReader - Input stream readerString if there was no data in streamIOExceptionCopyright © 2016. All rights reserved.