谁能将以下的Java代码转化成delphi的
private String postHttpData( String urlStr, String xmlInfo, String charset )   
{
StringBuffer response = new StringBuffer();
try {
            URL url = new URL(urlStr);
            URLConnection con = url.openConnection();
            con.setDoOutput(true);
            con.setRequestProperty("Pragma:", "no-cache");
            con.setRequestProperty("Cache-Control", "no-cache");
            con.setRequestProperty("Content-Type", "text ml");            OutputStreamWriter out = new OutputStreamWriter(con.getOutputStream());
            FWLog.LogResult(urlStr+"-"+xmlInfo);
//            System.out.println("urlStr=" + urlStr);
//            System.out.println("xmlInfo=" + xmlInfo);
            out.write(new String(xmlInfo.getBytes(charset)));
            
            out.flush();
            out.close();
            
            BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream()));
            String line = "";
            for (line = br.readLine(); line != null; line = br.readLine()) {
             response.append(line);
            }
        } catch (MalformedURLException e) {
         return "<Response><success>false</success><reason>connect error</reason></Response>";
        } catch (IOException e) {
         return "<Response><success>false</success><reason>connect error</reason></Response>";
        }        if(response.toString().equals("")){
         response.append("<Response><success>false</success><reason>connect error</reason></Response>");
        }
        
        FWLog.LogResult("response:"+response.toString());
        return response.toString();
}Java编程delphi

解决方案 »

  1.   

    算了吧,你还不如说想实现什么功能,让高人来帮你用delphi来实现。
      

  2.   

    string XMLDataDigest(string xml)
    {
        //xml: 需要发送的xml正文内容,如订单部分<RequestOrders>……</RequestOrders>
            //密钥: fineex_S7                       
            string EnPswdStr = FormsAuthentication.HashPasswordForStoringInConfigFile(xml + "fineex", "MD5");        //Post完整内容:
            string xmlData = "data_Isdigest=Y&logistics_interface=" + xml + "&data_digest=" + EnPswdStr;
            return xmlData;
    }
      

  3.   

    string XMLDataDigest(string xml)
    {
        //xml: 需要发送的xml正文内容,如订单部分<RequestOrders>……</RequestOrders>
            //密钥: fineex_S7                       
            string EnPswdStr = FormsAuthentication.HashPasswordForStoringInConfigFile(xml + "fineex", "MD5");        //Post完整内容:
            string xmlData = "data_Isdigest=Y&logistics_interface=" + xml + "&data_digest=" + EnPswdStr;
            return xmlData;
    }
    如何转为delphi 代码