<%
java.io.File f=new java.io.File(imagepath,file_name);
java.io.OutputStream outStream = response.getOutputStream();
response.setContentType( "application/pdf" );
response.setContentLength((int)f.length());
response.setHeader("Cache-Control", "max-age=60");
byte[] buf = new byte[8192];
java.io.FileInputStream inStream = new java.io.FileInputStream(f);
int sizeRead = 0;
while ((sizeRead = inStream.read(buf, 0, buf.length)) > 0) {
outStream.write(buf, 0, sizeRead);
}
inStream.close();
outStream.close();
%>

java.io.File f=new java.io.File(imagepath,file_name);
java.io.OutputStream outStream = response.getOutputStream();
response.setContentType( "application/pdf" );
response.setContentLength((
response.setHeader("Cache-
byte[] buf = new byte[8192];
java.io.FileInputStream inStream = new java.io.FileInputStream(f);
int sizeRead = 0;
while ((sizeRead = inStream.read(buf, 0, buf.length)) > 0) {
outStream.write(buf, 0, sizeRead);
}
inStream.close();
outStream.close();
%>

No comments:
Post a Comment