com.ibm.wbi.protocol.http.beans
Class FileGeneratorHelper

java.lang.Object
  |
  +--com.ibm.wbi.protocol.http.beans.FileGeneratorHelper

public class FileGeneratorHelper
extends java.lang.Object

Helper for the FileGenerator class.


Field Summary
static java.lang.String COPYRIGHT
          IBM copyright information.
 
Constructor Summary
FileGeneratorHelper(java.io.File f)
          Construct the file helper.
FileGeneratorHelper(FileGeneratorHelper directory, java.lang.String f)
          Construct the file helper from a FileGeneratorHelper that corresponds to a directory and a filename within that directory
FileGeneratorHelper(java.lang.String f)
          Construct the file helper.
 
Method Summary
 boolean exists()
          Determine if the file exists.
 java.io.File getFile()
          Get the File object that refers to the file.
 boolean isDirectory()
          Determine if the file refers to a directory.
 long length()
          Get the length of the file.
 void writeData(java.io.OutputStream out)
          Write the data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
IBM copyright information.
Constructor Detail

FileGeneratorHelper

public FileGeneratorHelper(java.lang.String f)
Construct the file helper.

FileGeneratorHelper

public FileGeneratorHelper(java.io.File f)
Construct the file helper.

FileGeneratorHelper

public FileGeneratorHelper(FileGeneratorHelper directory,
                           java.lang.String f)
Construct the file helper from a FileGeneratorHelper that corresponds to a directory and a filename within that directory
Method Detail

exists

public boolean exists()
Determine if the file exists.
Returns:
true if exists; else false.

length

public long length()
Get the length of the file.
Returns:
The file length.

isDirectory

public boolean isDirectory()
Determine if the file refers to a directory.
Returns:
true if the file refers to a directory.

getFile

public java.io.File getFile()
Get the File object that refers to the file.
Returns:
the File object for this file.

writeData

public void writeData(java.io.OutputStream out)
Write the data.
Parameters:
out - The output stream.