public String getFilePath(String path)throws URISyntaxException {
URL res =this.getClass().getClassLoader().getResource(path);if(res == null){
System.out.println(path +" :path can not get file");}
File f = Paths.get(res.toURI()).toFile();return f.getAbsolutePath();}}
Inputstream 转 fileInputStream ins = httpUrlConnection.getInputStream(); try { OutputStream os = new FileOutputStream("E:/PDFs/test/test.pdf"); int bytesRead = 0; byte[] buffer = new byte[8192]; while ((bytesRead = ins.read(buffer, 0, 81