Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

17
LINES

< > BotCompany Repo | #1024946 // tarInJar - repacks a .jar file, puts all files in bulk.tar [OK]

JavaX fragment (include) [tags: use-pretranspiled]

Uses 578K of libraries. Click here for Pure Java version (2268L/15K).

1  
svoid tarInJar(File jarIn, File jarOut) ctex {
2  
  print("tarInJar " + f2s(jarIn) + " => " + f2s(jarOut));
3  
  temp ZipOutputStream zipOut = zipOutputStream(jarOut);
4  
  zipOut.putNextEntry(new ZipEntry("bulk.tar"));
5  
  zip2tar(jarIn, zipOut);
6  
}
7  
8  
svoid tarInJar(File jarIn) {
9  
  if (!fileExists(jarIn)) ret;
10  
  File jarOut = fileInSameDirectory(jarIn, dropSuffixIC(".jar", jarIn.getName()) + ".repacked.jar");
11  
  renameFileToUniqueName(jarOut); // backup old version
12  
  tarInJar(jarIn, jarOut);
13  
}
14  
15  
svoid tarInJar(S jarIn) {
16  
  tarInJar(newFile(jarIn));
17  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1024946
Snippet name: tarInJar - repacks a .jar file, puts all files in bulk.tar [OK]
Eternal ID of this version: #1024946/9
Text MD5: 71da75deabb13ce03f49e10cbdb2f160
Transpilation MD5: 56b381b33f4d4580df5544cd2dd922a5
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-08-31 16:01:47
Source code size: 558 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 217 / 338
Version history: 8 change(s)
Referenced in: [show references]