public final class IOHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static InputStream |
bufferStream(InputStream in,
int maxMemSize)
Buffer input stream in memory of in file.
|
static String |
readString(InputStream in,
String cs)
Read String from given
InputStream. |
static void |
write(InputStream in,
OutputStream out)
Write data from
InputStream to OutputStream. |
static void |
write(Reader in,
Writer out)
|
static void |
writeString(String s,
OutputStream out,
String cs)
Write String to
OutputStream. |
public static void write(InputStream in, OutputStream out) throws IOException
InputStream to OutputStream.in - See InputStreamout - See OutputStreamIOException - if i/o errors occurspublic static void write(Reader in, Writer out) throws IOException
in - See Readerout - See WriterIOException - if i/o errors occurspublic static String readString(InputStream in, String cs) throws IOException
InputStream.in - source stream for readingcs - character set, if null then DEFAULT_CHARSET will be
usedIOException - if i/o errors occurspublic static void writeString(String s, OutputStream out, String cs) throws IOException
OutputStream.s - Stringout - See OutputStreamcs - character set, if null then DEFAULT_CHARSET will be
usedIOException - if i/o errors occurspublic static InputStream bufferStream(InputStream in, int maxMemSize) throws IOException
maxMemSize all data stored
in memory otherwise stored in file.in - source streammaxMemSize - max size of data to keep in memoryIOException - if any i/o error occursCopyright © 2012–2016 Codenvy, S.A.. All rights reserved.