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

6
LINES

< > BotCompany Repo | #1003871 // toURL - convert anything to URL

JavaX fragment (include)

static URL toURL(O o) ctex {
  if (o instanceof URL) ret (URL) o;
  if (o instanceof S) ret new URL((S) o);
  if (o instanceof File) ret fileToURL((File) o);
  fail("Can't convert to URL: " + o);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1003871
Snippet name: toURL - convert anything to URL
Eternal ID of this version: #1003871/1
Text MD5: d2a7c175b1d748b6dd99e3b737874822
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-07-29 14:51:25
Source code size: 202 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 571 / 568
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)