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

6
LINES

< > BotCompany Repo | #1029377 // intToBytes_inArray_littleEndian

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (31L/1K).

svoid intToBytes_inArray_littleEndian(int i, byte[] array, int idx) {
  array[idx] = (byte) i;
  array[idx+1] = (byte) (i >>> 8);
  array[idx+2] = (byte) (i >>> 16);
  array[idx+3] = (byte) (i >>> 24);
}

Author comment

Began life as a copy of #1023058

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1029377
Snippet name: intToBytes_inArray_littleEndian
Eternal ID of this version: #1029377/1
Text MD5: 7b604e3995c4fb1ddf147763e22f37c4
Transpilation MD5: 1b838340d15ccc7626a58abf49372967
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-08-03 11:48:09
Source code size: 208 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 209 / 315
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1031654 - intToBytes_inArray_littleEndian_partial