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

13
LINES

< > BotCompany Repo | #1020605 // saveBinaryFilePart

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

Transpiled version (2228L) is out of date.

1  
svoid saveBinaryFilePart(S path, long start, byte[] data) {
2  
  saveBinaryFilePart(path, start, data);
3  
}
4  
5  
svoid saveBinaryFilePart(File f, long start, byte[] data) ctex {
6  
  RandomAccessFile raf = newRandomAccessFile(f, "rw");
7  
  try {
8  
    raf.seek(start);
9  
    raf.write(data);
10  
  } finally {
11  
    raf.close();
12  
  }
13  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1020605
Snippet name: saveBinaryFilePart
Eternal ID of this version: #1020605/6
Text MD5: ada837c5c2d4b7e38b1ee7876c4cf0f6
Author: stefan
Category: javax / io
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-09-17 00:18:05
Source code size: 322 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 309 / 414
Version history: 5 change(s)
Referenced in: [show references]