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

15
LINES

< > BotCompany Repo | #1035635 // ByteIO - read/writable using a ByteHead

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

Libraryless. Click here for Pure Java version (13544L/77K).

1  
/*
2  
Typical way to implement (from WidthAndHeightImpl):
3  
ifclass ByteHead
4  
  public void readWrite(ByteHead head) {
5  
    head.exchangeInt(l0 width, w -> width = w);
6  
    head.exchangeInt(l0 height, h -> height = h);
7  
  }
8  
endif
9  
*/
10  
11  
interface ByteIO {
12  
  replace SomethingHead with ByteHead.
13  
  
14  
  !include early #1035662 // ByteIO/BitIO helpers
15  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): elmgxqgtpvxh, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1035635
Snippet name: ByteIO - read/writable using a ByteHead
Eternal ID of this version: #1035635/12
Text MD5: ee411696984e8ffbaa7de0a485eefb2f
Transpilation MD5: b0ba60ce8c3e67ac9dda60c38462a30c
Author: stefan
Category: javax / io
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-11-08 14:54:20
Source code size: 351 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 196 / 282
Version history: 11 change(s)
Referenced in: [show references]