org.webdocwf.util.smime.util
Class ConvertAssist

java.lang.Object
  |
  +--org.webdocwf.util.smime.util.ConvertAssist

public class ConvertAssist
extends java.lang.Object

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


Constructor Summary
ConvertAssist()
           
 
Method Summary
static byte[] inStreamToByteArray(java.io.InputStream in0)
          Reads data from input stream into the byte array.
static byte[] readFileToByteArray(java.io.File file0)
          Reads data from file into the byte array.
static java.lang.String readFileToString(java.io.File file0)
          Reads data from file 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

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

readFileToString

public static java.lang.String readFileToString(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

readFileToByteArray

public static byte[] readFileToByteArray(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


Copyright © 2002-2002 Together Teamlösungen. All Rights Reserved.