Skip to content

Commit 8db49ae

Browse files
#3 refactoring
1 parent 04872d4 commit 8db49ae

6 files changed

+11
-1
lines changed

src/main/java/ru/olegcherednik/zip4jvm/io/out/entry/encrypted/Bzip2EntryOutputStream.java

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public void write(byte[] buf, int offs, int len) throws IOException {
4949
@Override
5050
public void close() throws IOException {
5151
bzip2.close();
52+
encoderDataOutput.encodingAccomplished();
5253
super.close();
5354
}
5455

src/main/java/ru/olegcherednik/zip4jvm/io/out/entry/encrypted/DeflateEntryOutputStream.java

+1
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ private void finish() throws IOException {
9191
@Override
9292
public void close() throws IOException {
9393
finish();
94+
encoderDataOutput.encodingAccomplished();
9495
super.close();
9596
}
9697
}

src/main/java/ru/olegcherednik/zip4jvm/io/out/entry/encrypted/EncryptedEntryOutputStream.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public void write(byte[] buf, int offs, int len) throws IOException {
7878

7979
@Override
8080
public void close() throws IOException {
81-
encoderDataOutput.encodingAccomplished();
81+
//encoderDataOutput.encodingAccomplished();
8282
emos.close();
8383
}
8484

src/main/java/ru/olegcherednik/zip4jvm/io/out/entry/encrypted/LzmaEntryOutputStream.java

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ public void write(byte[] buf, int offs, int len) throws IOException {
7070
@Override
7171
public void close() throws IOException {
7272
lzma.close();
73+
encoderDataOutput.encodingAccomplished();
7374
super.close();
7475
}
7576

src/main/java/ru/olegcherednik/zip4jvm/io/out/entry/encrypted/StoreEntryOutputStream.java

+6
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,10 @@ public void write(byte[] buf, int offs, int len) throws IOException {
3939
encoderDataOutput.write(buf, offs, len);
4040
}
4141

42+
@Override
43+
public void close() throws IOException {
44+
encoderDataOutput.encodingAccomplished();
45+
super.close();
46+
}
47+
4248
}

src/main/java/ru/olegcherednik/zip4jvm/io/out/entry/encrypted/ZstdEntryOutputStream.java

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public void write(byte[] buf, int offs, int len) throws IOException {
4949
@Override
5050
public void close() throws IOException {
5151
zstd.close();
52+
encoderDataOutput.encodingAccomplished();
5253
super.close();
5354
}
5455

0 commit comments

Comments
 (0)