InputStream stream = ftp.retrieveFileStream(info.getFileSvnPath());
response.reset();
response.setContentType("application/x-download");
String filenamedisplay = URLEncoder.encode(info.getFileName(), "UTF-8");
response.addHeader("Content-Disposition", "attachment;filename=" + filenamedisplay);
OutputStream output = null;
try {
output = response.getOutputStream();
byte[] b = new byte[stream.available()];
int i = 0;
while ((i = stream.read(b))>0) {
output.write(b,0,i);
}
output.flush();
}
response.reset();
response.setContentType("application/x-download");
String filenamedisplay = URLEncoder.encode(info.getFileName(), "UTF-8");
response.addHeader("Content-Disposition", "attachment;filename=" + filenamedisplay);
OutputStream output = null;
try {
output = response.getOutputStream();
byte[] b = new byte[stream.available()];
int i = 0;
while ((i = stream.read(b))>0) {
output.write(b,0,i);
}
output.flush();
}