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

10
LINES

< > BotCompany Repo | #1007028 // shortArrayFromBytes - big-endian

JavaX fragment (include)

1  
static short[] shortArrayFromBytes(byte[] a) {
2  
  ret shortArrayFromBytes(a, 0, l(a));
3  
}
4  
5  
static short[] shortArrayFromBytes(byte[] a, int from, int to) {
6  
  short[] b = new short[(to-from)/2];
7  
  for (int i = 0; i < b.length; i++)
8  
    b[i] = shortFromBytes(a, from+i*2);
9  
  ret b;
10  
}

Author comment

Began life as a copy of #1004987

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: #1007028
Snippet name: shortArrayFromBytes - big-endian
Eternal ID of this version: #1007028/4
Text MD5: 3e2ba29def37253109bca0be5e108c79
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-08-08 16:19:29
Source code size: 288 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 506 / 502
Version history: 3 change(s)
Referenced in: [show references]