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 voidclose()closes the currently open ZipEntry and ZipOutpuStreamvoidcloseEntry()closes the currently used ZipEntrybooleancontainsEntry(java.lang.String entryname)java.lang.StringgetCurrentEntryName()returns the name of the currently 'open' ZipEntryjava.io.FilegetFile()returns the currently used file instance (could be null)java.lang.StringgetFileExtension()Returns the file extension of the file associated with this instance.java.lang.StringgetMimeType()returns the mime type (here: MediaManager.getInstance().getMimeTypeByExtension( EXTENSION_ZIP ))java.io.OutputStreamgetOutputStream()returns the currently used ZipOutputStreambooleanhasOpenEntry()returns true if there exists an 'open' ZipEntryvoidstartNewEntry(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:
getOutputStreamin interfaceImpExFile- Returns:
- OutputStream
-
startNewEntry
public void startNewEntry(java.lang.String filename) throws java.io.IOExceptioncreates 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.IOExceptioncloses the currently open ZipEntry and ZipOutpuStream
-
closeEntry
public void closeEntry() throws java.io.IOExceptioncloses 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:
getMimeTypein interfaceImpExFile- Returns:
- mime typ
-
getFileExtension
public java.lang.String 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
public boolean containsEntry(java.lang.String entryname)
-
-