org.loom.persistence.file
Class InputStreamFileContents

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

public class InputStreamFileContents
extends java.lang.Object
implements PersistentFileContents

A file that is only available as an input stream


Constructor Summary
InputStreamFileContents(java.io.InputStream contents)
           
 
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

InputStreamFileContents

public InputStreamFileContents(java.io.InputStream contents)
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).