Now this code works perfeclty with basic text files, but for images and pictures it seems to get more information than actually there, e.g a 76kb jpeg image becomes 120kb....
Any one know why this is doing this, or can point me in a better direction. I dont really want to use one of these jsp upload beans, and orielly wont work with the java version installed on the machine when program is to be run, and again is allready all there something i dont want to have Thanks in advance [ December 12, 2005: Message edited by: Al Hollis ]
You're using Readers and Writers, which are specifically meant for text only, to operate on binary data such as image files. Which are not text, so they get damaged when you do that. Change your code to use InputStreams and OutputStreams; they will work for text files as well.
posted 12 years ago
Thank you very much was doing my head in lol.... Should have read the api's
Now i have a problem...
How big can i set my byte array...
byte line = new byte;
Does that equal 5 megs?? if so why when i upload a 1.2 meg pdf do i only recieve 78k??