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).

1  
persistable sclass ByteArrayOrFile {
2  
  settable byte[] byteArray;
3  
  settable File file;
4  
  
5  
  *(byte[] *byteArray) {}
6  
  *(File *file) {}
7  
  
8  
  toString {
9  
    if (file != null) ret f2s(file);
10  
    if (byteArray != null) ret nBytes(byteArray);
11  
    ret "-";
12  
  }
13  
}

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: 155 / 233
Version history: 1 change(s)
Referenced in: [show references]