1 | static long copyStreamToDevNull(InputStream in) ctex { |
2 | try { |
3 | byte[] buf = new byte[65536]; |
4 | long total = 0; |
5 | while (true) { |
6 | int n = in.read(buf); |
7 | total += n; |
8 | if (n <= 0) return total; |
9 | } |
10 | } finally { |
11 | in.close(); |
12 | } |
13 | } |
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: | #1008748 |
Snippet name: | copyStreamToDevNull |
Eternal ID of this version: | #1008748/2 |
Text MD5: | 29b533e4e80fce4fc4e3c46f88aadfa0 |
Author: | stefan |
Category: | javax / i.o. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-05-31 13:56:49 |
Source code size: | 267 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 429 / 474 |
Version history: | 1 change(s) |
Referenced in: | [show references] |