code: public InputStream doPost(byte[] postData, String contentType) {
          this.urlConnection.setDoOutput(true);
          if (contentType != null) this.urlConnection.setRequestProperty( "Content-type", contentType );
  
          OutputStream out = null;
          try {
              out = this.getOutputStream();
              if(out!=null)
              {
                  out.write(postData);
                  out.flush();
              }
          } catch (IOException e) {
              e.printStackTrace();
          }finally {
              if(out!=null)
                  try {
                      out.close();
                  } catch (IOException e) {
                      //
                  }
          }
  
  
          return (this.getInputStream());
      }
docs: posts data to the inputstream and returns the InputStream.
  
  @param postData data to be posted. must be url-encoded already.
  @param contentType allows you to set the contentType of the request.
  @return InputStream input stream from URLConnection