这件事有效
public class Convert{
public static void main(String[] args) throws IOException
{
Converter converter = Converter.getInstance();;
converter.convert(new File("F:/outputxml.txt"),new File("F:/outBIGB.jpg"),"image/jpeg");
}
}
但这不..
protected void processRequest(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException
{
response.setContentType("text/html;charset=UTF-8");
PrintWriter out = response.getWriter();
Converter converter = Converter.getInstance();
converter.convert(new File("F:/outputxml.txt"),new File("F:/outBIGB.jpg"), "image/jpeg");
}
它会创建jpg文件但仍为空
当我尝试使用picasa或照片查看器打开图像时,它会显示"图像无效"
感谢任何帮助