I've created a jsp that will download a file for the user when its loaded. When this file is downloaded and opened, the end of the file contains this funny character - ΓΏ
Does any one have any idea how to remove this character or prevent this from happening. Here's a code snippet:
<%
//Throw the document
InputStream in = new FileInputStream(uploadDocFile);
OutputStream ros = response.getOutputStream();
response.setContentType("application/msword");
response.setHeader ("Content-Disposition", "attachment;filename="+docFilename);
int bit = 256;
int i = 0;
try {
while ((bit) >= 0) {
bit = in.read();
ros.write(bit);
}
} catch (IOException ioe) {
ioe.printStackTrace(System.out);
}
ros.flush();
ros.close();
in.close();
out.clear();
out = pageContext.pushBody();
%>