如果我创建 ZipEntry 时未指定其大小,则默认大小是多少?我需要指定它的尺寸吗?我们什么时候设置尺寸?我看到 ZipEntry 有一个 setSize(long size) 方法。
ZipEntry entry = new ZipEntry(filename);
最佳答案
查阅API:http://docs.oracle.com/javase/8/docs/api/java/util/zip/ZipEntry.html#getSize--
public long getSize() Returns the uncompressed size of the entry data. Returns: the uncompressed size of the entry data, or -1 if not known
或者自己调用 getSize() 并打印出它的值。
关于java - ZipEntry 的默认大小是多少,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23767048/