InputStream in ;
FormFile myFile ;
FileOutputStream fos ;
myFile = filmBean.getDyljpc(); //上传文件
if (myFile != null) {
in = myFile.getInputStream();
fos = new FileOutputStream(filmTypePc); //上传路径
byte buffer[] = new byte[10240]; //开始向上传路径中刚建立的文件写入数据,每次写10KB字节
int count = 0;
while ((count = in.read(buffer)) > 0) {
fos.write(buffer, 0, count);
}
fos.flush();
fos.close();
myFile.destroy();
}