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

1  
!7
2  
3  
p-exp {
4  
  File f = programFile("bla");
5  
  print(f);
6  
  saveTextFile(f, "hello");
7  
  URL url = new URL("file://" + f2s(f));
8  
  print(url);
9  
  InputStream in = url.openStream();
10  
  print("Got stream");
11  
  assertEqualsVerbose("hello", readerToString(utf8reader(in)));
12  
}

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: 401 / 1055
Version history: 3 change(s)
Referenced in: [show references]