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

8
LINES

< > BotCompany Repo | #1027002 // drainStream - read to nirvana. closes stream

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

Libraryless. Click here for Pure Java version (2160L/14K).

svoid drainStream(InputStream in) ctex {
  temp in;
  byte[] buf = new byte[65536];
  while (true) {
    int n = in.read(buf);
    if (n <= 0) return;
  }
}

Author comment

Began life as a copy of #1000844

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1027002
Snippet name: drainStream - read to nirvana. closes stream
Eternal ID of this version: #1027002/3
Text MD5: 403b54a9506d53064c8e6407a819d801
Transpilation MD5: bd464ddfe2cd2fc37446936f2dd5d6de
Author: stefan
Category: javax / io
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-02-06 14:44:55
Source code size: 163 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 250 / 356
Version history: 2 change(s)
Referenced in: [show references]