1 | static S readLineThroughUTF8Processor(UTF8Processor p, InputStream in) ctex {
|
2 | new StringBuilder input; |
3 | bool hasLine = false; |
4 | while (!hasLine) {
|
5 | int available=in.available(); |
6 | if (available==0) break; |
7 | byte b[]=new byte[available]; |
8 | in.read(b); |
9 | for i to available: {
|
10 | S s = p.processByte(b[i]); |
11 | if (nempty(s)) {
|
12 | input.append(s); |
13 | if (s.equals("\n")) hasLine = true;
|
14 | } |
15 | } |
16 | } |
17 | ret input.toString(); |
18 | } |
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: | #1008077 |
| Snippet name: | readLineThroughUTF8Processor |
| Eternal ID of this version: | #1008077/2 |
| Text MD5: | 6969828e61444cf630773ce993c7a644 |
| Author: | stefan |
| Category: | javax / gui |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-04-23 16:29:52 |
| Source code size: | 474 bytes / 18 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 728 / 771 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |