io
From: IS (finansije_at_yahoo.com)
Date: 10/27/03
- Next message: Hal Vaughan: "How to set Permissions on New File"
- Previous message: kimbuba: "Re: 10 CDs with best IT eBooks only for $60 - .NET, Java, C#, C++, UNIX, Oracle etc."
- Next in thread: Phillip Taylor: "Re: io"
- Reply: Phillip Taylor: "Re: io"
- Reply: Raymond DeCampo: "Re: io"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 27 Oct 2003 11:44:38 +0100
Hi,
I am new to java.io.* classes, and have a situation where I can't make a
copy of my binary files. Txt are being copied with no trouble but when it
comes to binaries i guess I am missing something since their structured is
changed and are not read by an application correctry (Word, ACDSee etc.).
At the moment, I have a JSP doing something like:
response.setContentType("APPLICATION/OCTET-STREAM");
response.setHeader("Content-Disposition", "attachment; filename=\"" +
filename + "\"");
java.io.FileInputStream fileInputStream = new
java.io.FileInputStream(dbBean.getDataPath() + filename);
int i;
while ((i=fileInputStream.read()) != -1) {
out.write(i); }
Please advise of where I am making a mistake or what other class and how
should I use.
Thanks!
I.S.
- Next message: Hal Vaughan: "How to set Permissions on New File"
- Previous message: kimbuba: "Re: 10 CDs with best IT eBooks only for $60 - .NET, Java, C#, C++, UNIX, Oracle etc."
- Next in thread: Phillip Taylor: "Re: io"
- Reply: Phillip Taylor: "Re: io"
- Reply: Raymond DeCampo: "Re: io"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|