-
Reading Files
Hi
I was trying to read a .jpg file and writing it into some another file. But the file contents differed. When I tried to find out what went wrong i found that all the characters with values 128 and more are written char 63. What is the problem. How can i overcome this.
Actually i am reading one byte at a time and storing in a stringbuffer. when the size becomes 4096 i will write the buffer by getting the bytes in it.
Please help
Kiran Kumar B.
-
Re: Reading Files
U can't use strings to store byte array.
If u want to do binary transfer either from file to file, or computer to computer. U should use byte and not strings.
JPG is considered binary file, as it can contain anything (in one byte).
Instead use byte array with 4096 size.
- UnicMan
http://members.tripod.com/unicman