Package fr.gouv.vitam.workspace.common.compress

# Class VitamArchiveStreamFactory

java.lang.Object
fr.gouv.vitam.workspace.common.compress.VitamArchiveStreamFactory

public class VitamArchiveStreamFactory extends Object
Factory to create ArchiveInputStreams from names

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `VitamArchiveStreamFactory()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `org.apache.commons.compress.archivers.ArchiveInputStream`
  `createArchiveInputStream(jakarta.ws.rs.core.MediaType mediaType, InputStream in)`
  Create an archive input stream from an archiver name and an input stream.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### VitamArchiveStreamFactory

    public VitamArchiveStreamFactory()

- ## Method Details

  - ### createArchiveInputStream

    public org.apache.commons.compress.archivers.ArchiveInputStream createArchiveInputStream(jakarta.ws.rs.core.MediaType mediaType, InputStream in) throws org.apache.commons.compress.archivers.ArchiveException, IOException
    Create an archive input stream from an archiver name and an input stream.
    Parameters:
      `mediaType` - MediaType object `MediaType` the archive name, i.e. ZIP, TAR, or GZIP
      `in` - the input stream
    Returns:
      the archive input stream
    Throws:
      `org.apache.commons.compress.archivers.ArchiveException` - if the archiver name is not known
      `IOException` - if cannot create gzip/bzip input stream
      `IllegalArgumentException` - if the archiver name or stream is null