protected void prepareConnection(HttpURLConnection con,int contentLength) throws IOException {
  super.prepareConnection(con,contentLength);
  if (getReadTimeout() != -1) {
    con.setReadTimeout(getReadTimeout());
  }
}

protected void prepareConnection ( HttpURLConnection con , int contentLength ) throws IOException { super . prepareConnection ( con , contentLength ) ; if ( getReadTimeout ( ) != - 1 ) { con . setReadTimeout ( getReadTimeout ( ) ) ; } }
prepare the given http connection . < p > the default implementation specifies post as method , " application / x - java - serialized - object " as " content - type " header , and the given content length as " content - length " header .
