SilverStream
Application Server 3.5

com.sssw.srv.mail
Class AgoStreamer

java.lang.Object
 |
 +--com.sssw.srv.mail.AgoStreamer

public class AgoStreamer
extends Object

Class that contains several static helper methods for streaming data between a source and a destination. For example, there’s a method in here for streaming characters from a Java Reader to a Java Writer.


Constructor Summary
AgoStreamer()
           
 
Method Summary
static void streamFromTo(InputStream in, OutputStream out)
          A helper method that streams bytes from one stream to another.
static void streamFromTo(Reader reader, Writer writer)
          A helper method that streams bytes from one stream to another.
static void streamFromTo(String string, OutputStream outputstream)
          A helper method that streams bytes from a String to a named OutputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgoStreamer

public AgoStreamer()
Method Detail

streamFromTo

public static void streamFromTo(InputStream in,
                                OutputStream out)
                         throws IOException
A helper method that streams bytes from one stream to another.
Parameters:
in - the stream to copy from
out - the stream to copy to
Example:
     mStream.streamFromTo(someInputStream,someOutputStream);
 

streamFromTo

public static void streamFromTo(Reader reader,
                                Writer writer)
                         throws IOException
A helper method that streams bytes from one stream to another.
Parameters:
reader - the Reader to copy from
writer - the Writer to copy to
Example:
     mStream.streamFromTo(someReader,someWriter);
 

streamFromTo

public static void streamFromTo(String string,
                                OutputStream outputstream)
                         throws IOException
A helper method that streams bytes from a String to a named OutputStream.
Parameters:
string - the String used as input
outputstream - the OutputStream
Example:
     mStream.streamFromTo(someString,someOutputStream);
 

SilverStream
Application Server 3.5