展开全部

后台获取到文件了e68a843231313335323631343130323136353331333431336135么File.getName就是文件名了

这个方法就是保存文件用的了 调用saveFile(file.getInputStrean,file.getName);private void saveFile(InputStream inputStream, String fileName) {
OutputStream os = null;        try {
String path = "D:\\testFile\\";            // 2、保存到临时文件            // 1K的数据缓冲
byte[] bs = new byte[1024];            // 读取到的数据长度
int len;            // 输出的文件流保存到本地文件
File tempFile = new File(path);            if (!tempFile.exists()) {
tempFile.mkdirs();
}
os = new FileOutputStream(tempFile.getPath() + File.separator + fileName);            // 开始读取
while ((len = inputStream.read(bs)) != -1) {
os.write(bs, 0, len);
}
} catch (IOException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
} finally {            // 完毕,关闭所有链接
try {
os.close();
inputStream.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}