Package de.hybris.platform.impex.jalo
Class ImpExZip
- java.lang.Object
-
- de.hybris.platform.impex.jalo.ImpExZip
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
closes the currently open ZipEntry and ZipOutpuStreamvoid
closeEntry()
closes the currently used ZipEntryboolean
containsEntry(java.lang.String entryname)
java.lang.String
getCurrentEntryName()
returns the name of the currently 'open' ZipEntryjava.io.File
getFile()
returns the currently used file instance (could be null)java.lang.String
getFileExtension()
Returns the file extension of the file associated with this instance.java.lang.String
getMimeType()
returns the mime type (here: MediaManager.getInstance().getMimeTypeByExtension( EXTENSION_ZIP ))java.io.OutputStream
getOutputStream()
returns the currently used ZipOutputStreamboolean
hasOpenEntry()
returns true if there exists an 'open' ZipEntryvoid
startNewEntry(java.lang.String filename)
creates a new ZipEntry with the specified name
-
-
-
Method Detail
-
getOutputStream
public java.io.OutputStream getOutputStream()
returns the currently used ZipOutputStream- Specified by:
getOutputStream
in interfaceImpExFile
- Returns:
- OutputStream
-
startNewEntry
public void startNewEntry(java.lang.String filename) throws java.io.IOException
creates a new ZipEntry with the specified name- Parameters:
filename
- name of the new ZipEntry- Throws:
java.io.IOException
-
hasOpenEntry
public boolean hasOpenEntry()
returns true if there exists an 'open' ZipEntry- Returns:
- true if there exists an 'open' ZipEntry
-
getCurrentEntryName
public java.lang.String getCurrentEntryName()
returns the name of the currently 'open' ZipEntry- Returns:
- ennty name
-
close
public void close() throws java.io.IOException
closes the currently open ZipEntry and ZipOutpuStream
-
closeEntry
public void closeEntry() throws java.io.IOException
closes the currently used ZipEntry- Throws:
java.io.IOException
-
getFile
public java.io.File getFile()
returns the currently used file instance (could be null)
-
getMimeType
public java.lang.String getMimeType()
returns the mime type (here: MediaManager.getInstance().getMimeTypeByExtension( EXTENSION_ZIP ))- Specified by:
getMimeType
in interfaceImpExFile
- Returns:
- mime typ
-
getFileExtension
public java.lang.String getFileExtension()
Description copied from interface:ImpExFile
Returns the file extension of the file associated with this instance.- Specified by:
getFileExtension
in interfaceImpExFile
- Returns:
- the file extension of the file associated with this instance
-
containsEntry
public boolean containsEntry(java.lang.String entryname)
-
-