{
os.write(buffer, 0, length);
fileSize_temp += length;
}
MemberFiles memberfiles = new MemberFiles();
int start = preFilename.lastIndexOf("\\");
String fileName = preFilename.substring(start+1);
memberfiles.setFileName(fileName);
memberfiles.setFileType(preFilename.substring(preFilename.lastIndexOf(".")+1));
memberfiles.setFileSize(new Double(fileSize_temp / 1024));
memberfiles.setFilePath(root+"\\"+preFilename);
memberfiles.setVgUser(user);
Calendar ca = Calendar.getInstance();
memberfiles.setCreateTime(ca.getTime());
ca.add(Calendar.DAY_OF_YEAR, 30);
memberfiles.setExpiryDate(ca.getTime());
this.save(memberfiles);
is.close();