|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object codesimian.Zips
public class Zips
static functions relevant to zip files. For example, jar is a type of zip, and you can rename any .jar file to .zip and it works as a normal .zip file.
Method Summary | |
---|---|
static byte[] |
get1FileFromZip(java.lang.String filePathNameInZip,
byte[] zipBytes)
|
static java.lang.String[] |
getFileNames(byte[] zipBytes)
TODO: for efficiency, dont read the bytes, get only the names |
static Jars.ZipEntryAndByteArray[] |
unzip(java.util.zip.ZipInputStream zipIn)
unzip all files in zipIn |
static byte[] |
zipCsArray(CS[] namesAndByteArrays)
for all CS in namesAndByteArrays[]: use CS.name() and (byte[]) CS.L(byte[].class) |
static byte[] |
zipFileOrFolder(java.io.File fileOrFolder)
|
static byte[] |
zipFileOrFolder(java.io.File fileOrFolder,
int compressionLevel0None9Most,
java.lang.String commentOfZipFile)
Zips 1 file or if its a folder, zips everything in that folder recursively. |
static void |
zipPathNameSaveToPathName(java.lang.String fileOrFolderPathName,
java.lang.String saveToThisFilePathName)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void zipPathNameSaveToPathName(java.lang.String fileOrFolderPathName, java.lang.String saveToThisFilePathName) throws java.io.IOException
java.io.IOException
public static byte[] zipFileOrFolder(java.io.File fileOrFolder) throws java.io.IOException
java.io.IOException
public static byte[] zipFileOrFolder(java.io.File fileOrFolder, int compressionLevel0None9Most, java.lang.String commentOfZipFile) throws java.io.IOException
java.io.IOException
public static byte[] zipCsArray(CS[] namesAndByteArrays)
public static java.lang.String[] getFileNames(byte[] zipBytes)
public static Jars.ZipEntryAndByteArray[] unzip(java.util.zip.ZipInputStream zipIn)
public static byte[] get1FileFromZip(java.lang.String filePathNameInZip, byte[] zipBytes)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |