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

7
LINES

< > BotCompany Repo | #1033116 // intFromByteList_littleEndian_partial

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

Libraryless. Click here for Pure Java version (3869L/22K).

1  
static int intFromByteList_littleEndian_partial(L<Byte> l, int i) {
2  
  int n = l(l);
3  
  ret (ubyteToInt(i+3 >= n ? 0 : l.get(i+3)) << 24
4  
    | (ubyteToInt(i+2 >= n ? 0 : l.get(i+2)) << 16
5  
    | (ubyteToInt(i+1 >= n ? 0 : l.get(i+1)) << 8
6  
    | ubyteToInt(l.get(i)));
7  
}

Author comment

Began life as a copy of #1031658

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1033116
Snippet name: intFromByteList_littleEndian_partial
Eternal ID of this version: #1033116/1
Text MD5: 1759fdd5ae3524dd1040cefe62c09825
Transpilation MD5: 45f9ae6372cdbabf316981332c252008
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-15 15:39:03
Source code size: 272 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 169 / 238
Referenced in: [show references]