aspose file tools
The moose likes Sockets and Internet Protocols and the fly likes images and HTTP Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "images and HTTP" Watch "images and HTTP" New topic
Author

images and HTTP

gigel chiazna
Greenhorn

Joined: Jul 09, 2001
Posts: 17
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 ?


<a href="http://www.stockapplets.com" target="_blank" rel="nofollow">Stock Market Java Applets</a>
flaying ma
Greenhorn

Joined: Jan 16, 2002
Posts: 4
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

Joined: Jul 09, 2001
Posts: 17
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

Joined: Jul 09, 2001
Posts: 17
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.
 
 
subject: images and HTTP
 
Threads others viewed
How to avoid image caching in Swing
how to read the response coming from XML file in jsp
iPhone application (game development) and facing problems
File downloading
Parsing text file into 3 columns
developer file tools