我有一小段代码从github下载一个zip文件。我已经以这种格式https://token:x-oauth-basic@github.xxxx.com/org/repo/archive/branch.zip插入了令牌。下载有效但我什么时候
ZipInputStream zis = ZipInputStream new FileInputStream(new FileInputStream(downloadedfilepath));
ZipEntry entry = null;
while ((entry=zis.getNextEntry()) != null) {
System.out.println("Reached");
}
zis.getNextEntry()虽然zip中有很多内容,但仍返回null。 此代码适用于任何其他zip,但不适用于使用令牌从github下载的zip。
任何帮助都会真的很有用。