public class StreamUtil extends Object
Constructor and Description |
---|
StreamUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
io(InputStream in,
OutputStream out)
Io.
|
static void |
io(InputStream in,
OutputStream out,
int bufferSize)
Io.
|
static void |
io(Reader in,
Writer out)
Io.
|
static void |
io(Reader in,
Writer out,
int bufferSize)
Io.
|
static String |
readText(InputStream in)
Read text string.
|
static String |
readText(InputStream in,
String encoding)
Read text string.
|
static String |
readText(InputStream in,
String encoding,
int bufferSize)
Read text string.
|
static String |
readText(Reader reader)
Read text string.
|
static String |
readText(Reader reader,
int bufferSize)
Read text string.
|
static OutputStream |
synchronizedOutputStream(OutputStream out)
Synchronized output stream output stream.
|
static OutputStream |
synchronizedOutputStream(OutputStream out,
Object lock)
Synchronized output stream output stream.
|
public static void io(InputStream in, OutputStream out) throws IOException
in
- the inout
- the outIOException
- the io exceptionpublic static void io(InputStream in, OutputStream out, int bufferSize) throws IOException
in
- the inout
- the outbufferSize
- the buffer sizeIOException
- the io exceptionpublic static void io(Reader in, Writer out) throws IOException
in
- the inout
- the outIOException
- the io exceptionpublic static void io(Reader in, Writer out, int bufferSize) throws IOException
in
- the inout
- the outbufferSize
- the buffer sizeIOException
- the io exceptionpublic static OutputStream synchronizedOutputStream(OutputStream out)
out
- the outpublic static OutputStream synchronizedOutputStream(OutputStream out, Object lock)
out
- the outlock
- the lockpublic static String readText(InputStream in) throws IOException
in
- the inIOException
- the io exceptionpublic static String readText(InputStream in, String encoding) throws IOException
in
- the inencoding
- the encodingIOException
- the io exceptionpublic static String readText(InputStream in, String encoding, int bufferSize) throws IOException
in
- the inencoding
- the encodingbufferSize
- the buffer sizeIOException
- the io exceptionpublic static String readText(Reader reader) throws IOException
reader
- the readerIOException
- the io exceptionpublic static String readText(Reader reader, int bufferSize) throws IOException
reader
- the readerbufferSize
- the buffer sizeIOException
- the io exceptionCopyright © 2018. All rights reserved.