Methods Summary |
---|
public void | close()
zf.close();
|
public java.util.Enumeration | entries()
return zf.entries();
|
public java.util.zip.ZipEntry | getEntry(java.lang.String name)
return zf.getEntry(name);
|
public java.io.InputStream | getInputStream(java.util.zip.ZipEntry entry)
return zf.getInputStream(entry);
|
public java.lang.String | getName()
return zf.getName();
|
public static void | main(java.lang.String[] args)
try {
SerializableZipFile2 szf = new SerializableZipFile2(args[0]);
ByteArrayOutputStream bout = new ByteArrayOutputStream();
ObjectOutputStream oout = new ObjectOutputStream(bout);
oout.writeObject(szf);
oout.close();
System.out.println("Wrote object!");
ByteArrayInputStream bin = new
ByteArrayInputStream(bout.toByteArray());
ObjectInputStream oin = new ObjectInputStream(bin);
Object o = oin.readObject();
System.out.println("Read object!");
}
catch (Exception e) {
e.printStackTrace();
}
|
private void | readObject(java.io.ObjectInputStream in)
String filename = (String) in.readObject();
zf = new ZipFile(filename);
|
public int | size()
return zf.size();
|
private void | writeObject(java.io.ObjectOutputStream out)
out.writeObject(zf.getName());
|