org.loom.persistence.file
Class SystemFileContents

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

public class SystemFileContents
extends java.lang.Object
implements PersistentFileContents

A file that is stored as a regular file in the filesystem. Does not use the database for anything.


Constructor Summary
SystemFileContents(java.io.File file)
           
 
Method Summary
 java.io.InputStream getContentsAsStream()
           
 java.lang.Long getFileSize()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystemFileContents

public SystemFileContents(java.io.File file)
Method Detail

getContentsAsStream

public java.io.InputStream getContentsAsStream()
Specified by:
getContentsAsStream in interface PersistentFileContents
Returns:
the file contents as an InputStream

getFileSize

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