Commit 4dae4833 by yangliang

修改

parent fd944d1c
......@@ -1733,27 +1733,6 @@ public class TbXwRycjController {
}
}
private static MultipartFile createFileItem(String imgStr) {
if (imgStr == null) // 图像数据为空
return null;
String[] baseStrs = imgStr.split(",");
BASE64Decoder decoder = new BASE64Decoder();
try { // Base64解码
byte[] bytes = decoder.decodeBuffer(imgStr);
for (int i = 0; i < bytes.length; ++i) {
if (bytes[i] < 0) {// 调整异常数据
bytes[i] += 256;
}
}
return new Base64DecodeMultipartFile(bytes, baseStrs[0]);
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
public static void main(String[] args) {
//TbXwRycjController st = new TbXwRycjController();
//String str = st.GetImageStrs("C:/personphoto/201702/007/P51101140000020170220071.jpg");
......@@ -1763,7 +1742,6 @@ public class TbXwRycjController {
} catch (IOException e) {
e.printStackTrace();
}
createFileItem("123");
String str = "i/9j/ivo";
System.out.println(str.indexOf("/9j/"));
System.out.println(bjDate("2018-10-11 15:12:11","2018-10-11 15:12:11"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment