1 | static String binaryUrlencode(byte[] data) { |
2 | char[] chars = new char[data.length]; |
3 | for (int i = 0; i < data.length; i++) |
4 | chars[i] = (char) (((int) data[i]) & 0xFF); |
5 | try { return URLEncoder.encode(new String(chars), "UTF-8"); } catch (Exception e) { throw new RuntimeException(e); } |
6 | } |
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: | #1000742 |
Snippet name: | binaryUrlencode |
Eternal ID of this version: | #1000742/1 |
Text MD5: | 0a5233cd4191e4ecfed77d81106020ad |
Author: | stefan |
Category: | |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2015-08-24 20:37:12 |
Source code size: | 298 bytes / 6 lines |
Pitched / IR pitched: | No / Yes |
Views / Downloads: | 563 / 533 |
Referenced in: | [show references] |