org.loom.persistence.file
Class ByteArrayPersistentFileContents
java.lang.Object
org.loom.persistence.file.DatabaseFileContents
org.loom.persistence.file.ByteArrayPersistentFileContents
- All Implemented Interfaces:
- PersistentFileContents
public class ByteArrayPersistentFileContents
- extends DatabaseFileContents
Extends PersistentFile with its data as a byte[]
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ByteArrayPersistentFileContents
public ByteArrayPersistentFileContents()
getContentsAsBytes
public byte[] getContentsAsBytes()
setContentsAsBytes
public void setContentsAsBytes(byte[] contents)
getContentsAsStream
public java.io.InputStream getContentsAsStream()
- Returns:
- the file contents as an InputStream
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).