Text file format lost in AIX
I am using RAD in Windows Environment I developed application which will throw the .txt file to the user(basically user can download a file from the server).
* This works fine in windows environment.
* But when I move the code to AIX environment then the user download the file but the alignment is messed up.
The code goes like this....
String filePath = System.getProperty("BIOP_FILE_GEN_PATH");
file = new File(filePath);
fis = new FileInputStream( file );
int len = fis.available();
byte byteArray[] = new byte[len];
fis.read(byteArray);
response.setContentType( "application/text" );
response.setHeader("Content-Disposition", "attachment; filename=\"" + input.getID_NAME_FILE() +"\"");
response.setContentLength( len );
response.getOutputStream().write( byteArray, 0, len );
response.getOutputStream().flush();
response.getOutputStream().close();
Anybody have any idea?
Thanks in advance