code: public static String post(String url, String bodyString, byte[] bodyByteArray, Map<String, String>... head) {
  
          BufferedReader in = null;
          StringBuilder sb = new StringBuilder();
  
          try {
              URL realUrl = new URL(url);
              URLConnection connection = realUrl.openConnection();
              if (head != null && head.length != 0) {
                  Map<String, String> header = head[0];
                  for (Map.Entry<String, String> h : header.entrySet()) {
                      connection.setRequestProperty(h.getKey(), h.getValue());
                  }
              }
              connection.setDoOutput(true);
              connection.setDoInput(true);
  
              if (bodyString != null) {
                  OutputStreamWriter outputStream = new OutputStreamWriter(connection.getOutputStream());
                  outputStream.write(bodyString);
                  outputStream.flush();
                  outputStream.close();
              }
  
              if (bodyByteArray != null) {
                  OutputStream outputStream = connection.getOutputStream();
                  outputStream.write(bodyByteArray);
                  outputStream.flush();
                  outputStream.close();
              }
  
              connection.connect();
  
              in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
  
              String line;
              while ((line = in.readLine()) != null) {
                  sb.append(line);
              }
          } catch (Exception e) {
              e.printStackTrace();
          } finally {
              try {
                  if (in != null) {
                      in.close();
                  }
              } catch (IOException ex) {
                  ex.printStackTrace();
              }
          }
          return sb.toString();
      }
docs: 使用POST方式请求目标网站
  @param bodyString 传输字符串数据
  @param bodyByteArray 传输byte数据 * 若bodyString已设值 则该参数无效
  @return
  @author acexy@thankjava.com
  @date 2016年1月4日 下午5:59:17
  @version 1.0