Commit a93de4c6 authored by Riegel's avatar Riegel
Browse files

Refactor: Unify filesize unit to bytes

parent 59072f60
Showing with 2 additions and 3 deletions
+2 -3
......@@ -11,7 +11,6 @@ public class CityGmlZipEntryFile implements AutoCloseable {
private final ZipEntry zipEntry;
private final CityGmlZipEntry cgmlZipEntry;
private boolean closed = false;
private static final long MB = 1024 * 1024L;
public CityGmlZipEntryFile(CityGmlZipEntry entry) throws IOException {
CityGmlZipArchive archive = entry.getArchive();
......@@ -38,9 +37,9 @@ public class CityGmlZipEntryFile implements AutoCloseable {
for (int i = is.read(); i != -1; i = is.read()) {
bytes++;
}
cgmlZipEntry.setFileSize((long) Math.ceil((double) bytes / MB));
cgmlZipEntry.setFileSize(bytes);
} else {
cgmlZipEntry.setFileSize((long) Math.ceil((double) zipEntry.getSize() / MB));
cgmlZipEntry.setFileSize(zipEntry.getSize());
}
}
return cgmlZipEntry.getFileSize();
......
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