org.loom.persistence.file
Interface PersistentFileContents

All Known Implementing Classes:
BlobPersistentFileContents, ByteArrayPersistentFileContents, DatabaseFileContents, InputStreamFileContents, SystemFileContents

public interface PersistentFileContents

Extends PersistentFile adding the file contents as an InputStream. File contents are kept apart to avoid them from being loaded eagerly. Lazy loading in some JPA containers (e.g. hibernate) required class code post-processing.


Method Summary
 java.io.InputStream getContentsAsStream()
           
 java.lang.Long getFileSize()
           
 

Method Detail

getContentsAsStream

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

getFileSize

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).