Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

21
LINES

< > BotCompany Repo | #1014155 // Test ByteCountingLineReader (OK)

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Uses 865K of libraries. Click here for Pure Java version (5235L/34K).

1  
!7
2  
3  
p {
4  
  maxConsoleChars(100000);
5  
  
6  
  File f = unpackSimpleWikipedia();
7  
  ByteCountingLineReader r = new(f);
8  
  long count = 0;
9  
  S line = null;
10  
  repeat 9999 {
11  
    count = r.byteCount();
12  
    print(count + " " + sfu(line = r.readLine()));
13  
  }
14  
  r.close();
15  
  
16  
  print("File size: " + fileSize(f));
17  
  S line_check = loadUtf8LineFromFile(f, count);
18  
  print("check: " + sfu(line_check));
19  
  assertEquals(line, line_check);
20  
  print("OK");
21  
}

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: #1014155
Snippet name: Test ByteCountingLineReader (OK)
Eternal ID of this version: #1014155/10
Text MD5: 26e53194c99ab7ab84c55e51912d769a
Transpilation MD5: 37bf45042e1cab58f8838184286cf37b
Author: stefan
Category: javax / io
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-04-15 13:04:05
Source code size: 455 bytes / 21 lines
Pitched / IR pitched: No / No
Views / Downloads: 311 / 943
Version history: 9 change(s)
Referenced in: [show references]