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

7
LINES

< > BotCompany Repo | #1002912 // intToBytes [big-endian]

JavaX fragment (include)

static byte[] intToBytes(int i) {
  return new byte[] {
          (byte) (i >>> 24),
          (byte) (i >>> 16),
          (byte) (i >>> 8),
          (byte) i};
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1002912
Snippet name: intToBytes [big-endian]
Eternal ID of this version: #1002912/2
Text MD5: 66de31a6f34e5c125abab778518900ba
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-08-02 18:34:40
Source code size: 170 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 609 / 1834
Version history: 1 change(s)
Referenced in: #1004989 - intArrayToBytes [big endian]
#1004991 - intFromBytes - big-endian
#1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1011527 - charToBytes
#1013133 - longToBytes
#1023058 - intToBytes_inArray [big-endian]
#3000382 - Answer for ferdie (>> t = 1, f = 0)
#3000383 - Answer for funkoverflow (>> t=1, f=0 okay)