SourceJammer 1.2.0.1 May 20, 2002
Copyright (c) 2001, 2002 Robert MacGrogan

org.sourcejammer.util
Class FileUtil

java.lang.Object
  |
  +--org.sourcejammer.util.FileUtil

public class FileUtil
extends java.lang.Object

Static functions related to files.


Method Summary
static long fileCheckSum(byte[] file)
          Returns the sum of all bytes in the byte array.
static void inputStreamToOutputStream(java.io.InputStream stmIn, java.io.OutputStream stmOut)
           
static byte[] readBytesFromFileSys(java.io.File fileRead)
           
static byte[] readBytesFromFileSys(java.lang.String fullPathAndName)
           
static java.lang.Object readObjectFromFileSys(java.io.File fileRead)
          Gets an object from file system.
static java.lang.Object readObjectFromFileSys(java.lang.String fullPathAndName)
          Gets an object from file system.
static void streamFileToFile(java.io.File source, java.io.File target)
           
static void writeBytesToFileSys(byte[] file, java.io.File fileWrite)
          Saves byte array as a file using fullPathAndName as location.
static void writeBytesToFileSys(byte[] file, java.lang.String fullPathAndName)
          Saves byte array as a file using fullPathAndName as location.
static void writeObjectToFileSys(java.lang.Object o, java.io.File fileWrite)
          Writes the object to the specified location on the file system.
static void writeObjectToFileSys(java.lang.Object o, java.lang.String fullPathAndName)
          Writes the object to the specified location on the file system.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

fileCheckSum

public static long fileCheckSum(byte[] file)
Returns the sum of all bytes in the byte array.

writeBytesToFileSys

public static void writeBytesToFileSys(byte[] file,
                                       java.lang.String fullPathAndName)
                                throws java.io.IOException
Saves byte array as a file using fullPathAndName as location.

writeBytesToFileSys

public static void writeBytesToFileSys(byte[] file,
                                       java.io.File fileWrite)
                                throws java.io.IOException
Saves byte array as a file using fullPathAndName as location.

readBytesFromFileSys

public static byte[] readBytesFromFileSys(java.lang.String fullPathAndName)
                                   throws java.io.IOException

readBytesFromFileSys

public static byte[] readBytesFromFileSys(java.io.File fileRead)
                                   throws java.io.IOException

readObjectFromFileSys

public static java.lang.Object readObjectFromFileSys(java.lang.String fullPathAndName)
                                              throws java.io.IOException
Gets an object from file system.

writeObjectToFileSys

public static void writeObjectToFileSys(java.lang.Object o,
                                        java.lang.String fullPathAndName)
                                 throws java.io.IOException
Writes the object to the specified location on the file system. If the file already exists, it will be overwritten.

writeObjectToFileSys

public static void writeObjectToFileSys(java.lang.Object o,
                                        java.io.File fileWrite)
                                 throws java.io.IOException
Writes the object to the specified location on the file system. If the file already exists, it will be overwritten.

readObjectFromFileSys

public static java.lang.Object readObjectFromFileSys(java.io.File fileRead)
                                              throws java.io.IOException
Gets an object from file system.

inputStreamToOutputStream

public static void inputStreamToOutputStream(java.io.InputStream stmIn,
                                             java.io.OutputStream stmOut)
                                      throws java.io.IOException

streamFileToFile

public static void streamFileToFile(java.io.File source,
                                    java.io.File target)
                             throws java.io.IOException

SourceJammer 1.2.0.1 May 20, 2002
Copyright (c) 2001, 2002 Robert MacGrogan