svoid swingOpenPhoneFile(S path) { swingOpenPhoneFile(gateway(), path); } svoid swingOpenPhoneFile(S ip , S path) { byte[] data = readFileFromPhone(ip, path); File f = prepareCacheProgramFile(md5(data) + ".data"); saveBinaryFile(f, data); if (isPNG(data)) showImage(path, loadBufferedImage(f)); else showText(path, fromUtf8(data)); }
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1004675 |
Snippet name: | swingOpenPhoneFile - open random file from phone graphically |
Eternal ID of this version: | #1004675/1 |
Text MD5: | f804d93008f9cc342f5a148a825d0a93 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-12-21 12:58:55 |
Source code size: | 366 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 633 / 579 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |