@@ -0,0 +1,2383 @@
+package com.vsked.myuploadframe;%0D%0A%0D%0Aimport java.io.File;%0D%0Aimport java.io.FileInputStream;%0D%0A%0D%0Aimport org.apache.http.HttpEntity;%0D%0Aimport org.apache.http.client.HttpClient;%0D%0Aimport org.apache.http.client.methods.CloseableHttpResponse;%0D%0Aimport org.apache.http.client.methods.HttpPost;%0D%0Aimport org.apache.http.entity.ContentType;%0D%0Aimport org.apache.http.entity.mime.MultipartEntityBuilder;%0D%0Aimport org.apache.http.entity.mime.content.InputStreamBody;%0D%0Aimport org.apache.http.entity.mime.content.StringBody;%0D%0Aimport org.apache.http.impl.client.CloseableHttpClient;%0D%0Aimport org.apache.http.impl.client.HttpClientBuilder;%0D%0Aimport org.apache.http.impl.client.HttpClients;%0D%0Aimport org.apache.http.util.EntityUtils;%0D%0A%0D%0Aimport com.vsked.util.ToolHttp;%0D%0A%0D%0Apublic class TestOcrA1 %7B%0D%0A%0D%0A%09public static void main(String%5B%5D args) %7B%0D%0A%09%09HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();  %0D%0A%09%09CloseableHttpClient httpClient = httpClientBuilder.build();  %0D%0A%09%09System.out.println(analysisPic(httpClient, %22%22));%0D%0A%0D%0A%09%7D%0D%0A%09%0D%0Apublic static String analysisPic(CloseableHttpClient httpClient,String picData)%7B%0D%0A%09%09%0D%0A%09%09String   content=%22%22 ;%0D%0A%09%09String url=%22http://www.netocr.com/srvc/recognize.srvc?fileapi14644057682896%22;%0D%0A%09%09HttpPost httpPost = new HttpPost(url);%0D%0A%09%09ContentType myContentType = ContentType.create(%22text/plain%22, %22UTF-8%22);%0D%0A%09%09StringBody catalogId = new StringBody(%221%22, myContentType);%0D%0A%09%09StringBody typeId = new StringBody(%222%22, myContentType);%0D%0A%09%09StringBody Filename = new StringBody(%221.jpg%22, myContentType);%0D%0A%09%09try %7B%0D%0A%09%09//FileBody files = new FileBody(new File(IDCardUrl));%0D%0A%09%09InputStreamBody files = new InputStreamBody(new FileInputStream(new File(%22e:/IDCard.jpg%22)), %221.jpg%22);%0D%0A%09%09%0D%0A        HttpEntity reqEntity = MultipartEntityBuilder.create()%0D%0A                .addPart(%22catalogId%22, catalogId)%0D%0A                .addPart(%22typeId%22, typeId)%0D%0A                .addPart(%22_files%22, Filename)%0D%0A                .addPart(%22files%22, files)%0D%0A                .build();%0D%0A        httpPost.setEntity(reqEntity);%0D%0A        CloseableHttpResponse response;%0D%0A%09%09%0D%0A%09%09%09response = httpClient.execute(httpPost);%0D%0A            HttpEntity entity = response.getEntity();%0D%0A            content  = EntityUtils.toString(entity,%22utf-8%22); %0D%0A            %0D%0A            System.out.println(%22%E5%86%85%E5%AE%B9:%5Cn%22+content);%0D%0A            response.close();%0D%0A%09%09%7D catch (Exception e) %7B%0D%0A%09%09%09e.printStackTrace();%0D%0A%09%09%7D %0D%0A%09%09return content;%0D%0A%09%7D%0D%0A%0D%0A%7D%0D%0A

add ocrtest