Commit 2aa639a1 authored by Riegel's avatar Riegel
Browse files

Style: Rename fields

2 merge requests!28Version 3.17.0 Release,!26Add ZIP-archive support
Showing with 5 additions and 6 deletions
+5 -6
......@@ -19,9 +19,8 @@ public class CityGmlZipEntry {
private final String fileName;
private CityDoctorModel model;
private CityGmlZipArchive parentArchive;
private boolean validated = false;
private boolean decompressed = false;
private long size = -1L;
private boolean decompressed;
private long fileSize = -1L;
private static final long MB = 1024 * 1024L;
private ZipEntryErrorType errorType = null;
......@@ -66,13 +65,13 @@ public class CityGmlZipEntry {
private boolean entrySizeWithinMemoryLimits() throws IOException {
long memoryLimit = (long) Math.ceil(((double) Runtime.getRuntime().maxMemory() / MB)*0.9);
if (size != -1L) {
return memoryLimit > size;
if (fileSize != -1L) {
return memoryLimit > fileSize;
}
try (CityGmlZipInputStream cgis = new CityGmlZipInputStream(this)){
long filesize = cgis.getFileSize(memoryLimit);
if (filesize != -1){
this.size = filesize;
this.fileSize = filesize;
return true;
} else {
return false;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment