Why not use writeObject/readObject via an ObjectOutputSream/ObjectInputStream to send/receive your image in a single call?
JamesCherrill
Posting Genius
6,373 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073
How is the browser asking for the image? Is because of an HTML tag like 
NormR1
Posting Expert
6,677 posts since Jun 2010
Reputation Points: 1,138
Solved Threads: 656