|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compiere.util.ZipUtil
public class ZipUtil
Zip/Jar File Utilities
| Constructor Summary | |
|---|---|
ZipUtil()
Empty Constructor, need to open explicitly. |
|
ZipUtil(File file)
Open zip file. |
|
ZipUtil(String fileName)
Open zip file. |
|
ZipUtil(URI uri)
Open zip file. |
|
| Method Summary | |
|---|---|
void |
close()
Close Zip File |
static void |
dumpManifest(String fileName)
Dump Manifest to |
Enumeration<? extends ZipEntry> |
entries()
Get ZipEntries as Enumeration |
static String |
findInPath(String jarFile)
Get Fill name of jarfile in path |
String[] |
getContent()
Get Content as sorted String Array |
ZipEntry |
getEntry(String name)
Get Zip Entry |
static ZipEntry |
getEntry(String fileName,
String entryName)
Get Zip Entry |
String |
getEntryInfo(String name)
Get File Info |
static String |
getEntryTime(String fileName,
String entryName)
Get Zip Entry time |
InputStream |
getInputStream(ZipEntry zipEntry)
Get the input stream for reading the content of the zip file entry |
JarFile |
getJar()
Get it as Jar if it is a Jar |
static JarFile |
getJar(String fileName)
Get Jar File |
static JarEntry |
getJarEntry(String fileName,
String jarEntry)
Get Manifest |
Manifest |
getManifest()
Get Manifest if a Jar |
static Manifest |
getManifest(String fileName)
Get Manifest |
boolean |
isJar()
Is it a Jar |
boolean |
isOpen()
Is the Zip File Open |
static void |
main(String[] args)
Test |
boolean |
open(File file)
Open the Zip File for reading |
boolean |
open(String fileName)
Open the Zip File for reading |
boolean |
open(URI uri)
Open the Zip File for reading |
String |
toString()
String Representation |
boolean |
writeToFile(ZipEntry zipEntry,
String fileName)
Write Entry to File |
File |
writeToTemp(ZipEntry zipEntry)
Write Entry to File |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ZipUtil()
public ZipUtil(String fileName)
fileName - zip file namepublic ZipUtil(File file)
file - zip filepublic ZipUtil(URI uri)
fileName - zip file name| Method Detail |
|---|
public boolean open(URI uri)
fileName - zip file
public boolean open(String fileName)
fileName - zip file
public boolean open(File file)
file - zip file
public void close()
public boolean isOpen()
public boolean isJar()
public JarFile getJar()
public String toString()
toString in class Objectpublic String[] getContent()
public Enumeration<? extends ZipEntry> entries()
public InputStream getInputStream(ZipEntry zipEntry)
throws IOException
IOException
public boolean writeToFile(ZipEntry zipEntry,
String fileName)
zipEntry - entryfileName - absolute path of the file
public File writeToTemp(ZipEntry zipEntry)
zipEntry - entry
public ZipEntry getEntry(String name)
name - entry name
public String getEntryInfo(String name)
name - name
public Manifest getManifest()
public static ZipEntry getEntry(String fileName,
String entryName)
fileName - zip/jar fileentryName - entry
public static JarFile getJar(String fileName)
fileName - zip/jar file
public static Manifest getManifest(String fileName)
fileName - zip/jar file
public static JarEntry getJarEntry(String fileName,
String jarEntry)
fileName - jar filejarEntry - jar entry
public static void dumpManifest(String fileName)
fileName - zip/jar file
public static String getEntryTime(String fileName,
String entryName)
fileName - zip fileentryName - entry
public static String findInPath(String jarFile)
jarFile - name
public static void main(String[] args)
args - ignored
|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||