static long streamLength(InputStream in) ctex { temp tempCloseStream(in); byte[] buf = new byte[65536]; long total = 0; while (true) { int n = in.read(buf); if (n <= 0) break; total += n; } ret total; }
Began life as a copy of #1000844
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: | #1014510 |
| Snippet name: | streamLength - also closes stream |
| Eternal ID of this version: | #1014510/1 |
| Text MD5: | cca5aee745ff4d6e21aef9817b6bea4d |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-04-22 22:35:26 |
| Source code size: | 236 bytes / 11 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 655 / 671 |
| Referenced in: | [show references] |