• Post Reply Bookmark Topic Watch Topic
  • New Topic

images and HTTP  RSS feed

 
gigel chiazna
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have developed an HTTP grabber that stores requests (both header and data) for later providing this requests based upon url (sortof proxy caching). I have some trouble with images. While text "plays" ok, images have some noise I can't figure it out what it is. I don't know if this comes from reading or from saving to file. I'm using string based storage on file and I tried reading both Strings and bytes. Any similiar experiences/solutions ?
 
flaying ma
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes!!I have the same question. I have trouble with image too, but with text file is ok!! And I
found the image files lose some bytes losed!!
I don't know what happend,Some one can help me!!
 
gigel chiazna
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I also get around 1% noise. While testing and trying to solve this problem, I opened by mistake with IrfanView a file where the hole http response (header and data) was saved and the image seemed ok. But if I remove the header and leave only the data I get a bad format error.
With gifs the image gets scrambled. I think I'll try to grab some sounds and see what it happens.
 
gigel chiazna
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found the solution: I was using StringBuffer which caused some noise on conversion. I changed to using byte[] and it works.
Flying, did you find anything else ? Please try this and tellme if it works, I'd like to know.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!