autohit.universe
Class UniverseUtils

java.lang.Object
  extended byautohit.universe.UniverseUtils

public class UniverseUtils
extends java.lang.Object

Utilities for universe interaction. Universe clients are welcome to use them.

Version:
1.0 Version HistoryEPG - Rewrite - 13Sep03
Author:
Erich P. Gatejen

Constructor Summary
UniverseUtils()
           
 
Method Summary
static java.lang.String load2String(java.io.InputStream is)
          Read from an InputStream into a String, using a default encoding.
static java.lang.String load2String(java.io.InputStream is, java.lang.String charSetName)
          Read from an InputStream into a String, using a specific encoding.
static void saveString(java.io.OutputStream os, java.lang.String text)
          Write from a String to an OutputStream, using a default encoding.
static void saveString(java.io.OutputStream os, java.lang.String text, java.lang.String charSetName)
          Write from a String to an OutputStream, using a specific encoding.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UniverseUtils

public UniverseUtils()
Method Detail

load2String

public static java.lang.String load2String(java.io.InputStream is)
                                    throws UniverseException
Read from an InputStream into a String, using a default encoding.

Parameters:
is - the InputStream
Returns:
string if successful
Throws:
UniverseException

load2String

public static java.lang.String load2String(java.io.InputStream is,
                                           java.lang.String charSetName)
                                    throws UniverseException
Read from an InputStream into a String, using a specific encoding.

Parameters:
is - the InputStream
charSetName - is the charset to use for encoding the stream.
Returns:
string if successful
Throws:
UniverseException

saveString

public static void saveString(java.io.OutputStream os,
                              java.lang.String text)
                       throws UniverseException
Write from a String to an OutputStream, using a default encoding.

Parameters:
os - the OutputStream
text - the string to save
Throws:
UniverseException

saveString

public static void saveString(java.io.OutputStream os,
                              java.lang.String text,
                              java.lang.String charSetName)
                       throws UniverseException
Write from a String to an OutputStream, using a specific encoding.

Parameters:
os - the OutputStream
text - the string to save
charSetName - is the charset to use for encoding the stream.
Throws:
UniverseException


Test.