Class ImpExZip

java.lang.Object
de.hybris.platform.impex.jalo.ImpExZip
All Implemented Interfaces:
ImpExFile

public class ImpExZip extends Object implements ImpExFile
This class will be used as a container for exported data and medias.
  • Constructor Details

  • Method Details

    • getOutputStream

      public OutputStream getOutputStream()
      returns the currently used ZipOutputStream
      Specified by:
      getOutputStream in interface ImpExFile
      Returns:
      OutputStream
    • startNewEntry

      public void startNewEntry(String filename) throws IOException
      creates a new ZipEntry with the specified name
      Parameters:
      filename - name of the new ZipEntry
      Throws:
      IOException
    • hasOpenEntry

      public boolean hasOpenEntry()
      returns true if there exists an 'open' ZipEntry
      Returns:
      true if there exists an 'open' ZipEntry
    • getCurrentEntryName

      public String getCurrentEntryName()
      returns the name of the currently 'open' ZipEntry
      Returns:
      ennty name
    • close

      public void close() throws IOException
      closes the currently open ZipEntry and ZipOutpuStream
      Specified by:
      close in interface ImpExFile
      Throws:
      IOException
    • closeEntry

      public void closeEntry() throws IOException
      closes the currently used ZipEntry
      Throws:
      IOException
    • getFile

      public File getFile()
      returns the currently used file instance (could be null)
      Specified by:
      getFile in interface ImpExFile
      Returns:
      the used file
    • getMimeType

      public String getMimeType()
      returns the mime type (here: MediaManager.getInstance().getMimeTypeByExtension( EXTENSION_ZIP ))
      Specified by:
      getMimeType in interface ImpExFile
      Returns:
      mime typ
    • getFileExtension

      public String getFileExtension()
      Description copied from interface: ImpExFile
      Returns the file extension of the file associated with this instance.
      Specified by:
      getFileExtension in interface ImpExFile
      Returns:
      the file extension of the file associated with this instance
    • containsEntry

      public boolean containsEntry(String entryname)