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

13
LINES

< > BotCompany Repo | #1035812 // ByteArrayOrFile

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

Libraryless. Click here for Pure Java version (9242L/51K).

persistable sclass ByteArrayOrFile {
  settable byte[] byteArray;
  settable File file;
  
  *(byte[] *byteArray) {}
  *(File *file) {}
  
  toString {
    if (file != null) ret f2s(file);
    if (byteArray != null) ret nBytes(byteArray);
    ret "-";
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): elmgxqgtpvxh, mqqgnosmbjvj, wnsclhtenguj

No comments. add comment

Snippet ID: #1035812
Snippet name: ByteArrayOrFile
Eternal ID of this version: #1035812/2
Text MD5: 4a195c7f8205a69eb1c22d2382c8065d
Transpilation MD5: ded405bd5c558f51957fd11ad1c9c7ca
Author: stefan
Category: javax / io
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-07-29 22:07:17
Source code size: 269 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 154 / 231
Version history: 1 change(s)
Referenced in: #1003674 - Standard Classes + Interfaces (LIVE continued in #1034167)