1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.commons.compress.archivers.jar;
20
21 import java.io.IOException;
22 import java.nio.file.Paths;
23
24 import org.apache.commons.compress.archivers.ArchiveStreamFactory;
25 import org.apache.commons.compress.archivers.examples.Expander;
26 import org.apache.commons.io.IOCase;
27 import org.apache.commons.io.file.PathUtils;
28 import org.apache.commons.io.filefilter.SuffixFileFilter;
29 import org.apache.commons.lang3.stream.Streams;
30 import org.junit.jupiter.api.Test;
31
32 public class ExpandApkTest {
33
34 private <T> T println(final T object) {
35
36 return object;
37 }
38
39 @Test
40 public void test() throws IOException {
41 Streams.failableStream(
42 PathUtils.walk(Paths.get("src/test/resources/android"), new SuffixFileFilter("." + ArchiveStreamFactory.APK, IOCase.INSENSITIVE), 100, false))
43 .forEach(path -> new Expander().expand(ArchiveStreamFactory.APK, println(path), null));
44 }
45 }