org.opennms.core.utils
Class StreamUtils

java.lang.Object
  extended by org.opennms.core.utils.StreamUtils

public class StreamUtils
extends java.lang.Object


Constructor Summary
StreamUtils()
           
 
Method Summary
static void streamToStream(java.io.InputStream in, java.io.OutputStream out)
          Convenience method for reading data from an InputStream and then immediately writing that data to an OutputStream with a default buffer size of one kilobyte (1,024 bytes).
static void streamToStream(java.io.InputStream in, java.io.OutputStream out, int bufferSize)
          Convenience method for reading data from an InputStream and then immediately writing that data to an OutputStream.
static void streamToStream(java.io.Reader in, java.io.Writer out)
          Convenience method for reading data from a Reader and then immediately writing that data to a Writer with a default buffer size of one kilobyte (1,024 chars).
static void streamToStream(java.io.Reader in, java.io.Writer out, int bufferSize)
          Convenience method for reading data from a Reader and then immediately writing that data to a Writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamUtils

public StreamUtils()
Method Detail

streamToStream

public static void streamToStream(java.io.Reader in,
                                  java.io.Writer out)
                           throws java.io.IOException
Convenience method for reading data from a Reader and then immediately writing that data to a Writer with a default buffer size of one kilobyte (1,024 chars).

Parameters:
in - a data source
out - a data sink
Throws:
java.io.IOException

streamToStream

public static void streamToStream(java.io.Reader in,
                                  java.io.Writer out,
                                  int bufferSize)
                           throws java.io.IOException
Convenience method for reading data from a Reader and then immediately writing that data to a Writer.

Parameters:
in - a data source
out - a data sink
bufferSize - the size of the char buffer to use for each read/write
Throws:
java.io.IOException

streamToStream

public static void streamToStream(java.io.InputStream in,
                                  java.io.OutputStream out)
                           throws java.io.IOException
Convenience method for reading data from an InputStream and then immediately writing that data to an OutputStream with a default buffer size of one kilobyte (1,024 bytes).

Parameters:
in - a data source
out - a data sink
Throws:
java.io.IOException

streamToStream

public static void streamToStream(java.io.InputStream in,
                                  java.io.OutputStream out,
                                  int bufferSize)
                           throws java.io.IOException
Convenience method for reading data from an InputStream and then immediately writing that data to an OutputStream.

Parameters:
in - a data source
out - a data sink
bufferSize - the size of the byte buffer to use for each read/write
Throws:
java.io.IOException


Copyright © 2007. All Rights Reserved.