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

8
LINES

< > BotCompany Repo | #1006539 // zip_addTextFile

JavaX fragment (include)

static void zip_addTextFile(ZipOutputStream outZip, S name, S text) ctex {
  if (text == null) ret;
  byte[] utf8 = toUtf8(text);
  ZipEntry e = new(name);
  e.setSize(l(utf8));
  outZip.putNextEntry(e);
  outZip.write(utf8, 0, l(utf8));
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1006539
Snippet name: zip_addTextFile
Eternal ID of this version: #1006539/3
Text MD5: bdece8d987090efccbf38711e11078a6
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-12-31 21:16:10
Source code size: 246 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 533 / 567
Version history: 2 change(s)
Referenced in: [show references]