Skip to content

Commit 603c142

Browse files
Bug fixes related to main stream, and others.
- Fixed the after-effect on closing the stream obtained from StreamZip.getInputStream(). - Enabled auto-close for resources (currently only the main stream).
1 parent b0022f3 commit 603c142

7 files changed

Lines changed: 29 additions & 8 deletions

File tree

.idea/deploymentTargetDropDown.xml

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

AndroidZip/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ dependencies {
3131
implementation 'androidx.appcompat:appcompat:1.5.1'
3232
implementation 'com.google.android.material:material:1.6.1'
3333

34-
implementation 'com.github.buggysofts-com:StreamZip:v1.0.1'
34+
implementation 'com.github.buggysofts-com:StreamZip:v1.0.4'
3535

3636
testImplementation 'junit:junit:4.13.2'
3737
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
3838
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
39+
3940
}

AndroidZip/src/main/java/com/buggysofts/androidzip/AndroidZip.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ public AndroidZip(@NonNull Context context, @NonNull DocumentFile documentFile)
2525

2626
/**
2727
* Get a particular entry.
28-
* */
29-
public ZipEntry getEntry(@NonNull String name){
28+
*/
29+
public ZipEntry getEntry(@NonNull String name) {
3030
return super.getEntry(name);
3131
}
3232

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ Finally, add these two dependencies to your app/module level build.gradle file
3333
3434
dependencies {
3535
...
36-
implementation 'com.github.buggysofts-com:StreamZip:v1.0.1'
37-
implementation 'com.github.buggysofts-com:AndroidZip:v1.0.1'
36+
implementation 'com.github.buggysofts-com:StreamZip:v1.0.4'
37+
implementation 'com.github.buggysofts-com:AndroidZip:v1.0.4'
3838
}
3939
```
4040
And you are done importing the library.

app/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@ dependencies {
3535
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
3636

3737
implementation project(':AndroidZip')
38-
implementation 'com.github.buggysofts-com:StreamZip:v1.0.1'
38+
implementation 'com.github.buggysofts-com:StreamZip:v1.0.4'
3939

4040
testImplementation 'junit:junit:4.13.2'
4141
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
4242
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
43+
4344
}

app/src/main/java/com/buggysofts/androidzipimpl/MainActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ protected void onActivityResult(int requestCode, int resultCode, @Nullable Inten
3030
DocumentFile.fromSingleUri(MainActivity.this, uri) :
3131
null;
3232

33-
if(documentFile != null){
33+
if (documentFile != null) {
3434
AndroidZip zip = null;
3535
try {
3636
zip = new AndroidZip(MainActivity.this, documentFile);
3737

3838
List<ZipEntry> entries = zip.entries();
3939
long e = System.currentTimeMillis();
40-
for (int i = 0; entries != null && i < entries.size(); ++i) {
40+
for (int i = 0; entries != null && i < entries.size(); ++i) {
4141
ZipEntry zipEntry = entries.get(i);
4242
if (!zipEntry.isDirectory()) {
4343
Log.d(

jitpack.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
jdk:
2+
- openjdk11

0 commit comments

Comments
 (0)