Creation Date Changes when downloading PDF
Hi.
Everytime i dowload a file, it changes the creation date to the current date, not the "real" creation date.
Is it possible to use the file's creationdate when downloading it?
protectedvoid processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException{
File file =new File("test.pdf");
response.setHeader("Content-Encoding","deflate");
response.setHeader("Transfer-Encoding","deflate");
response.setContentType("application/pdf");
response.setHeader("Content-Disposition","attachment; filename=\"test.pdf\"");
ServletOutputStream sos = response.getOutputStream();
byte data[] =newbyte[(int)file.length()];
try
{
BufferedInputStream bufferedinputstream =new BufferedInputStream(new FileInputStream(file));
bufferedinputstream.read(data);
dos.write(data,0,data.length);
bufferedinputstream.close();
}
catch(Exception exception){
exception.printStackTrace();
}
sos.close();
}
best regards
matthias

