Skip to content
GitLab
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
Dec 10, 2024
by
Riegel
Browse files
Style: Rename fields
parent
4ef61474
Changes
1
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/zip/CityGmlZipEntry.java
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
;
...
...
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