|
|
@@ -1,7 +1,6 @@
|
|
|
package com.ydtech.modules.order.entity.api.pingan.utils;
|
|
|
|
|
|
import org.apache.pdfbox.pdmodel.PDDocument;
|
|
|
-import sun.misc.BASE64Decoder;
|
|
|
import sun.misc.BASE64Encoder;
|
|
|
|
|
|
import java.io.*;
|
|
|
@@ -40,10 +39,9 @@ public class PDFUtil {
|
|
|
BufferedInputStream bin = null;
|
|
|
FileOutputStream fout = null;
|
|
|
BufferedOutputStream bout = null;
|
|
|
- BASE64Decoder decoder = new BASE64Decoder();
|
|
|
try {
|
|
|
//将base64编码的字符串解码成字节数组
|
|
|
- byte[] bytes = decoder.decodeBuffer(base64sString);
|
|
|
+ byte[] bytes = Base64Convert.encodeToString(base64sString);
|
|
|
//创建一个将bytes作为其缓冲区的ByteArrayInputStream对象
|
|
|
ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
|
|
|
//创建从底层输入流中读取数据的缓冲输入流对象
|