org.loom.persistence.file
Class BlobPersistentFileContents
java.lang.Object
org.loom.persistence.file.DatabaseFileContents
org.loom.persistence.file.BlobPersistentFileContents
- All Implemented Interfaces:
- PersistentFileContents
public class BlobPersistentFileContents
- extends DatabaseFileContents
A PersistentFile implementation that persists file contents as a BLOB
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BlobPersistentFileContents
public BlobPersistentFileContents()
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).