inputStream 转 file(pdf)

FileOutputStream out = null;
try {
out = new FileOutputStream("D:\\logs\\"+"cc.pdf");
} catch (FileNotFoundException e) {
e.printStackTrace();
}
int data;
try {
while((data = inputStream.read()) != -1) {
out.write(data);
}
inputStream.close();
out.close();
} catch (IOException e) {
e.printStackTrace();
}

猜你喜欢

转载自blog.csdn.net/xf_zhen/article/details/80886761