Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CityDoctor
CityDoctor2
Commits
2aa639a1
Commit
2aa639a1
authored
3 months ago
by
Riegel
Browse files
Options
Download
Email Patches
Plain Diff
Style: Rename fields
parent
4ef61474
master
dev
dev_cpp_code_conversion
dev_gui_features_zip_loading
3.17.0
archive/dev_gui_features_zip_loading
2 merge requests
!28
Version 3.17.0 Release
,
!26
Add ZIP-archive support
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/zip/CityGmlZipEntry.java
+5
-6
...ava/de/hft/stuttgart/citydoctor2/zip/CityGmlZipEntry.java
with
5 additions
and
6 deletions
+5
-6
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/zip/CityGmlZipEntry.java
+
5
-
6
View file @
2aa639a1
...
...
@@ -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
(
s
ize
!=
-
1L
)
{
return
memoryLimit
>
s
ize
;
if
(
fileS
ize
!=
-
1L
)
{
return
memoryLimit
>
fileS
ize
;
}
try
(
CityGmlZipInputStream
cgis
=
new
CityGmlZipInputStream
(
this
)){
long
filesize
=
cgis
.
getFileSize
(
memoryLimit
);
if
(
filesize
!=
-
1
){
this
.
s
ize
=
filesize
;
this
.
fileS
ize
=
filesize
;
return
true
;
}
else
{
return
false
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets