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

7
LINES

< > BotCompany Repo | #1002895 - setURLConnectionTimeouts

JavaX fragment (include)

static URLConnection setURLConnectionTimeouts(URLConnection con, long timeout) {
  con.setConnectTimeout(toInt(timeout));
  con.setReadTimeout(toInt(timeout));
  if (con.getConnectTimeout() != timeout || con.getReadTimeout() != timeout)
    print("Warning: Timeouts not set by JDK.");
  ret con;
}

download  show line numbers  debug dex   

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

No comments. add comment

Snippet ID: #1002895
Snippet name: setURLConnectionTimeouts
Eternal ID of this version: #1002895/3
Text MD5: c8a2095d5d0ead4d759d13b72e685a86
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-12-10 17:19:37
Source code size: 303 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 486 / 439
Version history: 2 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1002895 & http://1002895.tinybrain.de