java端servlet接收的方法
String pic=request.getParameter("picture");//安桌端base64过来的字段
try {
byte[] bytes1= Base64Coder.decodeLines(pic);
ByteArrayInputStream bais = new ByteArrayInputStream(bytes1);
BufferedImage bi1 =ImageIO.read(bais);
String savepath="c:/1.jpg";
File w2 = new File(savepath);//可以是jpg,png,gif格式
ImageIO.write(bi1, "jpg", w2);
} catch (IOException e) {
e.printStackTrace();
}