org.loom.persistence.file
Class BlobPersistentFileContents

java.lang.Object
  extended by org.loom.persistence.file.DatabaseFileContents
      extended by org.loom.persistence.file.BlobPersistentFileContents
All Implemented Interfaces:
PersistentFileContents

public class BlobPersistentFileContents
extends DatabaseFileContents

A PersistentFile implementation that persists file contents as a BLOB


Constructor Summary
BlobPersistentFileContents()
           
 
Method Summary
 java.sql.Blob getContentsAsBlob()
           
 java.io.InputStream getContentsAsStream()
           
 java.lang.Long getFileSize()
           
 void setContentsAsBlob(java.sql.Blob contentsAsBlob)
           
 
Methods inherited from class org.loom.persistence.file.DatabaseFileContents
getFile, getId, setFile, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlobPersistentFileContents

public BlobPersistentFileContents()
Method Detail

getContentsAsBlob

public java.sql.Blob getContentsAsBlob()

getContentsAsStream

public java.io.InputStream getContentsAsStream()
Returns:
the file contents as an InputStream

setContentsAsBlob

public void setContentsAsBlob(java.sql.Blob contentsAsBlob)

getFileSize

public java.lang.Long getFileSize()
Returns:
the file size if known, null if cannot be calculated from the file contents (it must be handled elsewhere in that case).