ƯÁ¤ Á¦Ç°À» ¼±ÅÃÇϸé Ŭ¸¯ ÇÑ Á¦Ç°¿¡ ´ëÇÑ Á¤º¸¸¦ µðºñ¿¡ ¾÷µ¥ÀÌÆ® ÇÏ°í
ÇØ´çÇϴ ÷ºÎÆÄÀÏÀ» ´Ù¿î¹ÞÀ» ¼ö ÀÖµµ·Ï ÇÏ·Á°í ÇÕ´Ï´Ù.
µðºñ¿¡ ¿¬°á ÈÄ Á¤º¸¸¦ ¾÷µ¥ÀÌÆ®±îÁö´Â ´Ù ³¡³Â´Âµ¥
±× ´ÙÀ½¿¡ xxx.pdfÆÄÀÏ·Î ÆäÀÌÁö À̵¿À» ½ÃÄѹö·Á¼ ÇöÀç´Â À¥ºê¶ó¿ìÀú¿¡¼ pdf ÆÄÀÏÀÌ ¿¸³´Ï´Ù.
ÀÌ°É ´Ù¸¥ À̸§À¸·Î ÀúÀåÇϱⰡ ¶ß°Ô ÇÏ´Â ¹æ¹ýÀÌ ¾øÀ»±î¿ä? | |
|
//response.setContentType("application; charset=UTF-8");
response.setHeader("Content-type", "application/octet-stream");
response.setHeader("charset", "UTF-8");
response.setHeader("Content-Disposition", "attachment; filename=\"" + s_downFileName + "\"");
response.setHeader("Content-Transfer-Encoding", "binary");
response.setHeader("Content-Length", "" + cl_file.length());
cl_fin = new FileInputStream(cl_file);
byte[] ba_readBuffer = new byte[8192]; // 8K ¹öÆÛ
OutputStream cl_oStream = response.getOutputStream();
int i_sendByteLen = -1;
while ((i_sendByteLen = cl_fin.read(ba_readBuffer)) != -1) {
cl_oStream.write(ba_readBuffer, 0, i_sendByteLen);
cl_oStream.flush();
} // end while
Àû´çÈ÷ °æ·Î¶û º¯¼ö ¸ÂÃç¼ ½áº¸¼¼¿ä.