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

6
LINES

< > BotCompany Repo | #1009683 // closeURLConnection - safely close HttpURLConnection

JavaX fragment (include)

static void closeURLConnection(HttpURLConnection c, InputStream in) {
  pcall {
    if (in != null) in.close();
    if (c != null) c.disconnect();
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1009683
Snippet name: closeURLConnection - safely close HttpURLConnection
Eternal ID of this version: #1009683/2
Text MD5: 4cb432d05e1d83366626d688933d0968
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-08-13 23:41:28
Source code size: 157 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 370 / 416
Version history: 1 change(s)
Referenced in: [show references]