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

12
LINES

< > BotCompany Repo | #1018996 // Test reading from file URL

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

Download Jar. Libraryless. Click here for Pure Java version (5891L/41K).

!7

p-exp {
  File f = programFile("bla");
  print(f);
  saveTextFile(f, "hello");
  URL url = new URL("file://" + f2s(f));
  print(url);
  InputStream in = url.openStream();
  print("Got stream");
  assertEqualsVerbose("hello", readerToString(utf8reader(in)));
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1018996
Snippet name: Test reading from file URL
Eternal ID of this version: #1018996/4
Text MD5: 1fc38361e6baefe80ebd93702d660f5d
Transpilation MD5: f6b71ae4017c0237c03acb5acc2b2235
Author: stefan
Category: javax / io
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-10-19 21:11:23
Source code size: 274 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 399 / 1050
Version history: 3 change(s)
Referenced in: [show references]