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).

!7

p {
  maxConsoleChars(100000);
  
  File f = unpackSimpleWikipedia();
  ByteCountingLineReader r = new(f);
  long count = 0;
  S line = null;
  repeat 9999 {
    count = r.byteCount();
    print(count + " " + sfu(line = r.readLine()));
  }
  r.close();
  
  print("File size: " + fileSize(f));
  S line_check = loadUtf8LineFromFile(f, count);
  print("check: " + sfu(line_check));
  assertEquals(line, line_check);
  print("OK");
}

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: 426 / 1214
Version history: 9 change(s)
Referenced in: #1014158 - Test speed of loadUtf8LineFromFile (OK, got 10 ms)