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)

static short[] shortArrayFromBytes(byte[] a) {
  ret shortArrayFromBytes(a, 0, l(a));
}

static short[] shortArrayFromBytes(byte[] a, int from, int to) {
  short[] b = new short[(to-from)/2];
  for (int i = 0; i < b.length; i++)
    b[i] = shortFromBytes(a, from+i*2);
  ret b;
}

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: 579 / 576
Version history: 3 change(s)
Referenced in: [show references]