Libraryless. Click here for Pure Java version (4866L/27K).
1 | svoid replaceFileZip2Zip(File inZip, File outZip, |
2 | S toReplace, byte[] newContents) {
|
3 | |
4 | Zip2Zip z2z = new(inZip, outZip); |
5 | z2z.copyFileContents = (name, in, out) -> {
|
6 | if (eq(name, toReplace)) {
|
7 | print("REPLACING " + name);
|
8 | ctex {
|
9 | out.write(newContents); |
10 | } |
11 | } else |
12 | copyStream(in, out); |
13 | }; |
14 | z2z.run(); |
15 | } |
Began life as a copy of #1033499
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1033514 |
| Snippet name: | replaceFileZip2Zip |
| Eternal ID of this version: | #1033514/2 |
| Text MD5: | a4c3be50b4e479b60c9efce56412b5e9 |
| Transpilation MD5: | ea6fa89b100e8ea57d12829a3617f45e |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-10-29 09:18:03 |
| Source code size: | 361 bytes / 15 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 336 / 438 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |