Class ZipRepository
- java.lang.Object
-
- org.pentaho.reporting.libraries.repository.zip.ZipRepository
-
- All Implemented Interfaces:
Repository
public class ZipRepository extends Object implements Repository
A read-write repository based on ZIP streams. The repository can be created using a existing zip file as initial content. The repository will be fully buffered, so nothing is written until the whole repository is closed. For a streaming solution use the zipwriter-repository instead.- Author:
- Thomas Morgner
-
-
Constructor Summary
Constructors Constructor Description ZipRepository()
ZipRepository(InputStream in)
ZipRepository(InputStream in, MimeRegistry mimeRegistry)
ZipRepository(MimeRegistry mimeRegistry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MimeRegistry
getMimeRegistry()
Returns the repositories MimeRegistry, which is used return basic content-type information about the items stored in this repository.ContentLocation
getRoot()
Returns the repositories root directory entry.void
write(OutputStream outputStream)
void
writeToZipStream(ZipOutputStream zipOutputStream, Repository repository)
-
-
-
Constructor Detail
-
ZipRepository
public ZipRepository()
-
ZipRepository
public ZipRepository(MimeRegistry mimeRegistry)
-
ZipRepository
public ZipRepository(InputStream in) throws IOException
- Throws:
IOException
-
ZipRepository
public ZipRepository(InputStream in, MimeRegistry mimeRegistry) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getRoot
public ContentLocation getRoot() throws ContentIOException
Description copied from interface:Repository
Returns the repositories root directory entry.- Specified by:
getRoot
in interfaceRepository
- Returns:
- the root directory.
- Throws:
ContentIOException
- if an error occurs.
-
getMimeRegistry
public MimeRegistry getMimeRegistry()
Description copied from interface:Repository
Returns the repositories MimeRegistry, which is used return basic content-type information about the items stored in this repository.- Specified by:
getMimeRegistry
in interfaceRepository
- Returns:
- the mime registry.
- See Also:
MimeRegistry
-
write
public void write(OutputStream outputStream) throws IOException, ContentIOException
- Throws:
IOException
ContentIOException
-
writeToZipStream
public void writeToZipStream(ZipOutputStream zipOutputStream, Repository repository) throws IOException, ContentIOException
- Throws:
IOException
ContentIOException
-
-