java调用阿里OCR身份识别接口
前几天需要用到阿里的OCR接口,中间有踩坑,现在记录下来,已便使用 一.BASE64 OCR调用文档中需要传入BASE64,感谢Apache <dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> <version>1.9</version> </dependency> 下面是图片转BASE64的代码 public static String getBase64( File file){ String res=""; try { byte[] content = new byte[(int) file.length()]; FileInputStream finputstream = new FileInputStream(file); finputstream.read(content); finputstream.close(); res=new String(Base64....








