public class IOUtils extends Object
| Constructor and Description |
|---|
IOUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
readAll(InputStream inputStream)
Read all stream byte data into
String |
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 String |
readAll(InputStream inputStream,
String charset)
Read all stream byte data into
String |
static void |
writeAll(String data,
OutputStream outputStream)
Write string to byte stream
|
static void |
writeAll(String data,
OutputStream outputStream,
Charset charset)
Write string to byte stream
|
static void |
writeAll(String data,
OutputStream outputStream,
String 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 void writeAll(String data, OutputStream outputStream, String charset) throws IOException
data - Source stringoutputStream - Output streamcharset - Convert string to bytes according to givenIOExceptionpublic static void writeAll(String data, OutputStream outputStream) throws IOException
data - Source stringoutputStream - Output streamIOExceptionpublic 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(InputStream inputStream, String charset) throws IOException
StringinputStream - Source streamcharset - Convert bytes to chars according to givenString if there was no data in streamIOExceptionpublic static String readAll(InputStream inputStream) throws IOException
StringinputStream - Source streamString 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 © 2017. All rights reserved.