protected void close() throws XmlRpcClientException { final URLConnection c = getURLConnection(); if (c instanceof HttpURLConnection) { ((HttpURLConnection) c).disconnect(); } }
protected void close() throws XmlRpcClientException { final URLConnection c = getURLConnection(); if (c instanceof HttpURLConnection) { ((HttpURLConnection) c).disconnect(); } }
protected void setRequestHeader(String pHeader, String pValue) { getURLConnection().setRequestProperty(pHeader, pValue); }
protected void setRequestHeader(String pHeader, String pValue) { getURLConnection().setRequestProperty(pHeader, pValue); }
protected void writeRequest(ReqWriter pWriter) throws IOException, XmlRpcException, SAXException { pWriter.write(getURLConnection().getOutputStream()); } }
protected boolean isResponseGzipCompressed(XmlRpcStreamRequestConfig pConfig) { return HttpUtil.isUsingGzipEncoding(getURLConnection().getHeaderField("Content-Encoding")); }
protected boolean isResponseGzipCompressed(XmlRpcStreamRequestConfig pConfig) { return HttpUtil.isUsingGzipEncoding(getURLConnection().getHeaderField("Content-Encoding")); }
protected void writeRequest(ReqWriter pWriter) throws IOException, XmlRpcException, SAXException { pWriter.write(getURLConnection().getOutputStream()); } }
protected InputStream getInputStream() throws XmlRpcException { try { URLConnection connection = getURLConnection(); if ( connection instanceof HttpURLConnection ) { HttpURLConnection httpConnection = (HttpURLConnection) connection; int responseCode = httpConnection.getResponseCode(); if (responseCode < 200 || responseCode > 299) { throw new XmlRpcHttpTransportException(responseCode, httpConnection.getResponseMessage()); } } return connection.getInputStream(); } catch (IOException e) { throw new XmlRpcException("Failed to create input stream: " + e.getMessage(), e); } }
protected InputStream getInputStream() throws XmlRpcException { try { URLConnection connection = getURLConnection(); if ( connection instanceof HttpURLConnection ) { HttpURLConnection httpConnection = (HttpURLConnection) connection; int responseCode = httpConnection.getResponseCode(); if (responseCode < 200 || responseCode > 299) { throw new XmlRpcHttpTransportException(responseCode, httpConnection.getResponseMessage()); } } return connection.getInputStream(); } catch (IOException e) { throw new XmlRpcException("Failed to create input stream: " + e.getMessage(), e); } }