static byte[] loadFirstBytes(S file, int n) { ret loadFirstBytes(new File(file), n); } static byte[] loadFirstBytes(File f, int n) { n = asInt(min(n, f.length())); ret loadBinaryFileChunk(f, 0, n); }
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, elmgxqgtpvxh, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1005312 |
Snippet name: | loadFirstBytes - load n first bytes from file |
Eternal ID of this version: | #1005312/2 |
Text MD5: | 17f426bb2437cf5c95dd9af489dd87cc |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-03-25 13:52:53 |
Source code size: | 213 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 598 / 582 |
Version history: | 1 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1018892 - loadFirstByte - first byte from file (returns -1 if file is empty/not existing) |