Package org.opennms.core.utils
Class StreamUtils
- java.lang.Object
-
- org.opennms.core.utils.StreamUtils
-
public abstract class StreamUtils extends Object
StreamUtils class.
-
-
Constructor Summary
Constructors Constructor Description StreamUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
streamToStream(InputStream in, OutputStream out)
Convenience method for reading data from anInputStream
and then immediately writing that data to anOutputStream
with a default buffer size of one kilobyte (1,024 bytes).static void
streamToStream(InputStream in, OutputStream out, int bufferSize)
Convenience method for reading data from anInputStream
and then immediately writing that data to anOutputStream
.static void
streamToStream(Reader in, Writer out)
Convenience method for reading data from aReader
and then immediately writing that data to aWriter
with a default buffer size of one kilobyte (1,024 chars).static void
streamToStream(Reader in, Writer out, int bufferSize)
Convenience method for reading data from aReader
and then immediately writing that data to aWriter
.
-
-
-
Method Detail
-
streamToStream
public static void streamToStream(Reader in, Writer out) throws IOException
Convenience method for reading data from aReader
and then immediately writing that data to aWriter
with a default buffer size of one kilobyte (1,024 chars).- Parameters:
in
- a data sourceout
- a data sink- Throws:
IOException
- if any.
-
streamToStream
public static void streamToStream(Reader in, Writer out, int bufferSize) throws IOException
Convenience method for reading data from aReader
and then immediately writing that data to aWriter
.- Parameters:
in
- a data sourceout
- a data sinkbufferSize
- the size of thechar
buffer to use for each read/write- Throws:
IOException
- if any.
-
streamToStream
public static void streamToStream(InputStream in, OutputStream out) throws IOException
Convenience method for reading data from anInputStream
and then immediately writing that data to anOutputStream
with a default buffer size of one kilobyte (1,024 bytes).- Parameters:
in
- a data sourceout
- a data sink- Throws:
IOException
- if any.
-
streamToStream
public static void streamToStream(InputStream in, OutputStream out, int bufferSize) throws IOException
Convenience method for reading data from anInputStream
and then immediately writing that data to anOutputStream
.- Parameters:
in
- a data sourceout
- a data sinkbufferSize
- the size of thebyte
buffer to use for each read/write- Throws:
IOException
- if any.
-
-