mirror of
https://github.com/corda/corda.git
synced 2025-01-23 04:48:09 +00:00
add ZipFile(File) constructor and ZipFile.close
This commit is contained in:
parent
114bf777bb
commit
aeafb52bcb
@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
package java.util.zip;
|
package java.util.zip;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.io.RandomAccessFile;
|
import java.io.RandomAccessFile;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -54,6 +55,10 @@ public class ZipFile {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ZipFile(File file) throws IOException {
|
||||||
|
this(file.getAbsolutePath());
|
||||||
|
}
|
||||||
|
|
||||||
public int size() {
|
public int size() {
|
||||||
return index.size();
|
return index.size();
|
||||||
}
|
}
|
||||||
@ -177,6 +182,10 @@ public class ZipFile {
|
|||||||
return get2(w, p + 28);
|
return get2(w, p + 28);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void close() throws IOException {
|
||||||
|
file.close();
|
||||||
|
}
|
||||||
|
|
||||||
private static class Window {
|
private static class Window {
|
||||||
private final RandomAccessFile file;
|
private final RandomAccessFile file;
|
||||||
public final byte[] data;
|
public final byte[] data;
|
||||||
|
Loading…
Reference in New Issue
Block a user