记录下。。唉。。。。

java代码:

导入这个

commons-codec-1.8.jar (下载链接: https://files.cnblogs.com/files/gaocong/jar%E5%8C%85.rar)
java后台方法 InputStream in
= null; byte[] data = null; //读取图片字节数组 try { in = new FileInputStream(imgFilePath); data = new byte[in.available()]; in.read(data); in.close(); } catch (IOException e) { e.printStackTrace(); } //对字节数组Base64编码 return new String(Base64.encodeBase64(data));//返回Base64编码过的字节数组字符串

然后在c#中解码

 //字符串转流
                byte[] bt = Convert.FromBase64String(m_l.BinaryImg);

 

相关文章:

  • 2021-07-07
  • 2021-12-17
  • 2022-12-23
  • 2022-12-23
  • 2021-12-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-02-19
  • 2021-05-24
  • 2021-10-01
  • 2021-09-15
  • 2022-12-23
  • 2021-07-23
  • 2021-06-18
相关资源
相似解决方案