Libraryless. Click here for Pure Java version (8280L/46K).
static ByteBuffer reversedByteBuffer(ByteBuffer buf) { if (buf == null) null; int n = buf.size(); byte[] data = buf.data, newData = new byte[n]; for i to n: newData[i] = data[n-1-i]; ret new ByteBuffer(newData); }
download show line numbers debug dex old transpilations
Travelled to 2 computer(s): mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1035372 |
Snippet name: | reversedByteBuffer |
Eternal ID of this version: | #1035372/2 |
Text MD5: | 23398d539eb205479351380776642649 |
Transpilation MD5: | 235f568c4b9566403963a4ef3276de71 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-05-03 13:05:29 |
Source code size: | 234 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 108 / 157 |
Version history: | 1 change(s) |
Referenced in: | [show references] |