Package de.hybris.platform.impex.jalo
Class ImpExZip
java.lang.Object
de.hybris.platform.impex.jalo.ImpExZip
- All Implemented Interfaces:
ImpExFile
This class will be used as a container for exported data and medias.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()closes the currently open ZipEntry and ZipOutpuStreamvoidcloses the currently used ZipEntrybooleancontainsEntry(String entryname) returns the name of the currently 'open' ZipEntrygetFile()returns the currently used file instance (could be null)Returns the file extension of the file associated with this instance.returns the mime type (here: MediaManager.getInstance().getMimeTypeByExtension( EXTENSION_ZIP ))returns the currently used ZipOutputStreambooleanreturns true if there exists an 'open' ZipEntryvoidstartNewEntry(String filename) creates a new ZipEntry with the specified name
-
Constructor Details
-
ImpExZip
- Throws:
IOException
-
ImpExZip
- Parameters:
fileName-- Throws:
IOException
-
-
Method Details
-
getOutputStream
returns the currently used ZipOutputStream- Specified by:
getOutputStreamin interfaceImpExFile- Returns:
- OutputStream
-
startNewEntry
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
returns the name of the currently 'open' ZipEntry- Returns:
- ennty name
-
close
closes the currently open ZipEntry and ZipOutpuStream- Specified by:
closein interfaceImpExFile- Throws:
IOException
-
closeEntry
closes the currently used ZipEntry- Throws:
IOException
-
getFile
returns the currently used file instance (could be null) -
getMimeType
returns the mime type (here: MediaManager.getInstance().getMimeTypeByExtension( EXTENSION_ZIP ))- Specified by:
getMimeTypein interfaceImpExFile- Returns:
- mime typ
-
getFileExtension
Description copied from interface:ImpExFileReturns the file extension of the file associated with this instance.- Specified by:
getFileExtensionin interfaceImpExFile- Returns:
- the file extension of the file associated with this instance
-
containsEntry
-