Class VitamArchiveStreamFactory
- java.lang.Object
-
- fr.gouv.vitam.workspace.common.compress.VitamArchiveStreamFactory
-
public class VitamArchiveStreamFactory extends java.lang.Object
Factory to create ArchiveInputStreams from names
-
-
Constructor Summary
Constructors Constructor Description VitamArchiveStreamFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.commons.compress.archivers.ArchiveInputStream
createArchiveInputStream(javax.ws.rs.core.MediaType mediaType, java.io.InputStream in)
Create an archive input stream from an archiver name and an input stream.
-
-
-
Method Detail
-
createArchiveInputStream
public org.apache.commons.compress.archivers.ArchiveInputStream createArchiveInputStream(javax.ws.rs.core.MediaType mediaType, java.io.InputStream in) throws org.apache.commons.compress.archivers.ArchiveException, java.io.IOException
Create an archive input stream from an archiver name and an input stream.- Parameters:
mediaType
- MediaType objectMediaType
the archive name, i.e. ZIP, TAR, or GZIPin
- the input stream- Returns:
- the archive input stream
- Throws:
org.apache.commons.compress.archivers.ArchiveException
- if the archiver name is not knownjava.io.IOException
- if cannot create gzip/bzip input streamjava.lang.IllegalArgumentException
- if the archiver name or stream is null
-
-