File tree Expand file tree Collapse file tree
src/main/java/the/bytecode/club/bytecodeviewer/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818import java .nio .file .FileSystem ;
1919import java .nio .file .FileSystems ;
2020import java .nio .file .Files ;
21+ import java .nio .file .Path ;
2122import java .nio .file .Paths ;
2223import java .util .ArrayList ;
2324import java .util .List ;
25+ import java .util .stream .Stream ;
2426import java .util .zip .ZipEntry ;
2527import java .util .zip .ZipOutputStream ;
2628
2729public class JRTExtractor {
2830 public static void extractRT (String path ) throws Throwable {
2931 FileSystem fs = FileSystems .getFileSystem (URI .create ("jrt:/" ));
3032
31- try (ZipOutputStream zipStream = new ZipOutputStream (Files .newOutputStream (Paths .get (path )))) {
32- Files .walk (fs .getPath ("/" )).forEach (p -> {
33+ try (ZipOutputStream zipStream = new ZipOutputStream (Files .newOutputStream (Paths .get (path )));
34+ Stream <Path > stream = Files .walk (fs .getPath ("/" ))) {
35+ stream .forEach (p -> {
3336 if (!Files .isRegularFile (p )) {
3437 return ;
3538 }
@@ -59,4 +62,4 @@ public static void extractRT(String path) throws Throwable {
5962 });
6063 }
6164 }
62- }
65+ }
You can’t perform that action at this time.
0 commit comments