static byte[] loadBinaryFromZip(File inZip, S fileName) ctex { ZipFile zip = new ZipFile(inZip); try { ZipEntry entry = zip.getEntry(fileName); if (entry == null) //fail("Entry " + fileName + " not found in zip file: " + inZip.getAbsolutePath()); ret null; InputStream fin = zip.getInputStream(entry); new ByteArrayOutputStream baos; copyStream(fin, baos); fin.close(); ret baos.toByteArray(); } finally { zip.close(); } }
Began life as a copy of #1002031
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1002527 |
Snippet name: | loadBinaryFromZip |
Eternal ID of this version: | #1002527/1 |
Text MD5: | adc16ae75c2074071edcb0d59fd356ac |
Author: | stefan |
Category: | |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-01-31 02:24:34 |
Source code size: | 497 bytes / 17 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 661 / 637 |
Referenced in: | [show references] |