Enhydra-Oyster 2.1-7 API

org.enhydra.oyster.util
Class ConvertAssist

java.lang.Object
  extended byorg.enhydra.oyster.util.ConvertAssist

public class ConvertAssist
extends java.lang.Object

This class contains static methods which make easier work and conversion between different types under the large amount of data (arrays, streams, files ...).


Constructor Summary
ConvertAssist()
           
 
Method Summary
static byte[] fileToByteArray(java.io.File file0)
          Reads data from file into the byte array.
static java.lang.String fileToString(java.io.File file0)
          Reads data from file into the String.
static byte[] inStreamToByteArray(java.io.InputStream in0)
          Reads data from input stream into the byte array.
static java.lang.String inStreamToString(java.io.InputStream in0)
          Reads data from input stream into the String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConvertAssist

public ConvertAssist()
Method Detail

inStreamToString

public static java.lang.String inStreamToString(java.io.InputStream in0)
                                         throws SMIMEException
Reads data from input stream into the String.

Parameters:
in0 - source of data for reading
Returns:
data extracted from input stream represented as String
Throws:
SMIMEException - caused by non SMIMEException which is IOException

inStreamToByteArray

public static byte[] inStreamToByteArray(java.io.InputStream in0)
                                  throws SMIMEException
Reads data from input stream into the byte array.

Parameters:
in0 - source of data for reading
Returns:
data extracted from input stream represented as byte array
Throws:
SMIMEException - caused by non SMIMEException which is IOException

fileToString

public static java.lang.String fileToString(java.io.File file0)
                                     throws SMIMEException
Reads data from file into the String.

Parameters:
file0 - abstract path to file represented as File object
Returns:
data from file represented as String
Throws:
SMIMEException - caused by non SMIMEException which is IOException

fileToByteArray

public static byte[] fileToByteArray(java.io.File file0)
                              throws SMIMEException
Reads data from file into the byte array.

Parameters:
file0 - abstract path to file represented as File object
Returns:
data from file represented as byte array
Throws:
SMIMEException - caused by non SMIMEException which is IOException

Enhydra-Oyster 2.1-7 API