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

7
LINES

< > BotCompany Repo | #1033091 - toByteList

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

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

static L<Byte> toByteList(O o) {
  if (o == null) null;
  if (o cast L) ret o;
  if (o cast Iterable) ret toList(o);
  if (o cast byte[]) ret wrapPrimitiveArrayAsImmutableList(o);
  fail();
}

Author comment

Began life as a copy of #1018464

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1033091
Snippet name: toByteList
Eternal ID of this version: #1033091/2
Text MD5: 59e8c2f6b40f3d79e290e7cbb24f3fc8
Transpilation MD5: ce0c87b99a415d46ddfb30a16ab319de
Author: stefan
Category: javax / io
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-14 04:31:45
Source code size: 197 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 8 / 25
Version history: 1 change(s)
Referenced in: [show references]