java.io.File file = new java.io.File(path);
java.io.FileInputStream fin = new java.io.FileInputStream(file);
//以上這行設定一個FileInputStream,參數設定檔案的原始路徑加檔名即可
OutputStream os=response.getOutputStream();
//取得response的OutputStream,以便等一下直接輸出檔案
byte[] b = new byte[1];
int j = 0;
while((j = fin.read(b)) > 0)
{
os.write(b);
}