proai.util
Class StreamUtil

java.lang.Object
  extended by proai.util.StreamUtil

public abstract class StreamUtil
extends java.lang.Object

Static methods for working with streams (and strings).


Field Summary
static int STREAM_BUFFER_SIZE
           
 
Constructor Summary
StreamUtil()
           
 
Method Summary
static java.util.Date convertLocalDateToUTCDate(java.util.Date localDate)
           
static java.lang.String getString(java.io.InputStream in, java.lang.String encoding)
          Read the given stream into a String, assuming the given character encoding.
static java.util.Date nowUTC()
           
static java.lang.String nowUTCString()
           
static void pipe(java.io.InputStream inStream, java.io.OutputStream outStream)
          Pipe the input stream directly to the output stream.
static java.lang.String xmlEncode(java.lang.String in)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STREAM_BUFFER_SIZE

public static final int STREAM_BUFFER_SIZE
See Also:
Constant Field Values
Constructor Detail

StreamUtil

public StreamUtil()
Method Detail

pipe

public static void pipe(java.io.InputStream inStream,
                        java.io.OutputStream outStream)
                 throws java.io.IOException
Pipe the input stream directly to the output stream.

Throws:
java.io.IOException

getString

public static java.lang.String getString(java.io.InputStream in,
                                         java.lang.String encoding)
                                  throws java.io.IOException
Read the given stream into a String, assuming the given character encoding.

Throws:
java.io.IOException

xmlEncode

public static java.lang.String xmlEncode(java.lang.String in)

nowUTC

public static java.util.Date nowUTC()

nowUTCString

public static java.lang.String nowUTCString()

convertLocalDateToUTCDate

public static java.util.Date convertLocalDateToUTCDate(java.util.Date localDate)