public class ZipStorage extends FileStorage
Constructor and Description |
---|
ZipStorage(File file)
Creates a storage instance for the specified file.
|
Modifier and Type | Method and Description |
---|---|
OutputStream |
createAppendStream()
Always throws an exception as appending is not supported in a ZIP file.
|
InputStream |
createInputStream()
Creates an input stream to read storage content.
|
OutputStream |
createOutputStream()
Creates an output stream to replace the storage with new content.
|
delete, exists, getCreationDate, getFile, toString
public ZipStorage(File file)
file
- the file where to store the data.public InputStream createInputStream() throws IOException, TrsStoreCorruptedException
StreamingStorage
createInputStream
in class FileStorage
IOException
- if the storage cannot be read.TrsStoreCorruptedException
- if the storage is corrupted.public OutputStream createOutputStream() throws IOException
StreamingStorage
createOutputStream
in class FileStorage
IOException
- if the storage cannot be written.public OutputStream createAppendStream() throws IOException
createAppendStream
in class FileStorage
IOException
- if the storage cannot be written.