static void copyStreamWithPrints(InputStream in, OutputStream out, S pat) ctex { byte[] buf = new byte[65536]; int total = 0; while (true) { int n = in.read(buf); if (n <= 0) return; out.write(buf, 0, n); if ((total+n)/100000 > total/100000) print(pat.replace("{*}", str(roundDownTo(100000, total)))); total += n; } }
Began life as a copy of #1000844
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1013671 |
| Snippet name: | copyStreamWithPrints |
| Eternal ID of this version: | #1013671/4 |
| Text MD5: | da75c4364507f9c6aec82a148bf962ce |
| Author: | stefan |
| Category: | javax / io |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-06-29 12:53:23 |
| Source code size: | 362 bytes / 12 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 742 / 784 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |