pt.moredata.util
Class FileImage

java.lang.Object
  extended bypt.moredata.util.FileImage
All Implemented Interfaces:
java.io.Serializable

public class FileImage
extends java.lang.Object
implements java.io.Serializable

Author:
Luis Medalhas
See Also:
Serialized Form

Field Summary
static boolean READ_LATER
           
static boolean READ_NOW
           
 
Constructor Summary
FileImage(java.io.File file)
           
FileImage(java.io.File file, boolean readNow)
           
 
Method Summary
 byte[] getContent()
          return the byte sequence contained in the file
 java.lang.String getName()
          return the file name of the original file
static void main(java.lang.String[] args)
           
 java.lang.String toString()
          return a compressed base64 string image of the file
static FileImage valueOf(java.lang.String encodedObject)
          creates a FileImage based on a string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

READ_NOW

public static final boolean READ_NOW
See Also:
Constant Field Values

READ_LATER

public static final boolean READ_LATER
See Also:
Constant Field Values
Constructor Detail

FileImage

public FileImage(java.io.File file,
                 boolean readNow)
          throws java.io.IOException

FileImage

public FileImage(java.io.File file)
          throws java.io.IOException
Method Detail

getContent

public byte[] getContent()
return the byte sequence contained in the file

Returns:
Throws:
java.io.IOException

getName

public java.lang.String getName()
return the file name of the original file

Returns:

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Throws:
java.io.IOException

toString

public java.lang.String toString()
return a compressed base64 string image of the file

Returns:

valueOf

public static FileImage valueOf(java.lang.String encodedObject)
creates a FileImage based on a string

Parameters:
encodedObject -
Returns: