| | |
| | | * @return |
| | | */ |
| | | public static File createLimitedQrCode(String at, String page, int width, boolean autoColor, |
| | | JSONObject lineColor, boolean isHyaline) throws IOException { |
| | | JSONObject lineColor, boolean isHyaline) { |
| | | String imgUrl = null; |
| | | InputStream in = null; |
| | | HttpURLConnection conn = null; |
| | | |
| | | //创建临时文件 |
| | | File file = File.createTempFile("temp", ".jpg"); |
| | | File file = null; |
| | | try { |
| | | file = File.createTempFile("temp", ".jpg"); |
| | | //生成发送数据 |
| | | JSONObject obj = new JSONObject(); |
| | | obj.put("width", width); |
| | |
| | | conn = null; |
| | | } |
| | | }finally { |
| | | file.deleteOnExit(); |
| | | if(file != null){ |
| | | file.deleteOnExit(); |
| | | } |
| | | } |
| | | return file; |
| | | } |