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 { ...@@ -19,9 +19,8 @@ public class CityGmlZipEntry {
private final String fileName; private final String fileName;
private CityDoctorModel model; private CityDoctorModel model;
private CityGmlZipArchive parentArchive; private CityGmlZipArchive parentArchive;
private boolean validated = false; private boolean decompressed;
private boolean decompressed = false; private long fileSize = -1L;
private long size = -1L;
private static final long MB = 1024 * 1024L; private static final long MB = 1024 * 1024L;
private ZipEntryErrorType errorType = null; private ZipEntryErrorType errorType = null;
...@@ -66,13 +65,13 @@ public class CityGmlZipEntry { ...@@ -66,13 +65,13 @@ public class CityGmlZipEntry {
private boolean entrySizeWithinMemoryLimits() throws IOException { private boolean entrySizeWithinMemoryLimits() throws IOException {
long memoryLimit = (long) Math.ceil(((double) Runtime.getRuntime().maxMemory() / MB)*0.9); long memoryLimit = (long) Math.ceil(((double) Runtime.getRuntime().maxMemory() / MB)*0.9);
if (size != -1L) { if (fileSize != -1L) {
return memoryLimit > size; return memoryLimit > fileSize;
} }
try (CityGmlZipInputStream cgis = new CityGmlZipInputStream(this)){ try (CityGmlZipInputStream cgis = new CityGmlZipInputStream(this)){
long filesize = cgis.getFileSize(memoryLimit); long filesize = cgis.getFileSize(memoryLimit);
if (filesize != -1){ if (filesize != -1){
this.size = filesize; this.fileSize = filesize;
return true; return true;
} else { } else {
return false; 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