nl.knowledgeplaza.util
Class ZipUtil

java.lang.Object
  extended by nl.knowledgeplaza.util.ZipUtil

public class ZipUtil
extends java.lang.Object


Field Summary
static java.lang.String SOURCECODE_VERSION
          Standard variable for determining version of a class file.
 
Constructor Summary
ZipUtil()
           
 
Method Summary
static void main(java.lang.String[] args)
           
static java.util.Map readZipFile(java.io.File file)
           
static java.util.Map readZipFile(java.io.InputStream inputStream)
           
static java.util.Map readZipFile(java.util.zip.ZipInputStream zipInputStream)
           
static void writeZipFileEntry(java.util.zip.ZipOutputStream zipOutputStream, java.lang.String zipEntryName, byte[] byteArray)
          Creates a new zip file entry with the given name and byte data.
static void writeZipFileEntry(java.util.zip.ZipOutputStream zipOutputStream, java.lang.String zipEntryName, java.io.InputStream inputStream)
           
static void zipDirectoryRecusively(java.io.File dir, java.io.File file)
           
static void zipDirectoryRecusively(java.io.File dir, java.io.FileFilter fileFilter, java.io.OutputStream outputStream)
           
static void zipDirectoryRecusively(java.io.File dir, java.io.OutputStream outputStream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SOURCECODE_VERSION

public static final java.lang.String SOURCECODE_VERSION
Standard variable for determining version of a class file.

See Also:
Constant Field Values
Constructor Detail

ZipUtil

public ZipUtil()
Method Detail

zipDirectoryRecusively

public static void zipDirectoryRecusively(java.io.File dir,
                                          java.io.File file)
                                   throws java.io.IOException
Parameters:
dir -
outputStream -
Throws:
java.io.IOException

zipDirectoryRecusively

public static void zipDirectoryRecusively(java.io.File dir,
                                          java.io.OutputStream outputStream)
                                   throws java.io.IOException
Parameters:
dir -
outputStream -
Throws:
java.io.IOException

zipDirectoryRecusively

public static void zipDirectoryRecusively(java.io.File dir,
                                          java.io.FileFilter fileFilter,
                                          java.io.OutputStream outputStream)
                                   throws java.io.IOException
Parameters:
dir -
fileFilter -
outputStream -
Throws:
java.io.IOException

writeZipFileEntry

public static void writeZipFileEntry(java.util.zip.ZipOutputStream zipOutputStream,
                                     java.lang.String zipEntryName,
                                     byte[] byteArray)
                              throws java.io.IOException
Creates a new zip file entry with the given name and byte data.

Parameters:
zipOutputStream - output stream new zip entry will be written to
zipEntryName - zip file entry name
byteArray - array of bytes to write representing file entry data
Throws:
java.io.IOException

writeZipFileEntry

public static void writeZipFileEntry(java.util.zip.ZipOutputStream zipOutputStream,
                                     java.lang.String zipEntryName,
                                     java.io.InputStream inputStream)
                              throws java.io.IOException
Parameters:
zipOutputStream -
zipEntryName -
inputStream -
Throws:
java.io.IOException

readZipFile

public static java.util.Map readZipFile(java.io.File file)
                                 throws java.io.IOException,
                                        java.io.FileNotFoundException
Throws:
java.io.IOException
java.io.FileNotFoundException

readZipFile

public static java.util.Map readZipFile(java.io.InputStream inputStream)
                                 throws java.io.IOException
Throws:
java.io.IOException

readZipFile

public static java.util.Map readZipFile(java.util.zip.ZipInputStream zipInputStream)
                                 throws java.io.IOException
Throws:
java.io.IOException

main

public static void main(java.lang.String[] args)


Copyright © 2010 KnowledgePlaza. All Rights Reserved.