Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

transfering of image files especially jpeg over tcp/ip in java

843790Mar 2 2008 — edited Mar 4 2008
hi, plz help me i am writing a code for transfer of jpeg or gif file over tcp

i hav tried many ways for it like

1)i have tried using sending serialized object containing image content in form of byte array......... but i come across errors like invalid stream header (java.io.streamcorruption exception) or sometime socketexception(s/w abort the connection)..................
but sometime it works very well
especially when i run it for first time it works ok, but then again itry to do it itfaila or sometime it works...........
i dont know the error
2) i hav even tried sending image in plain byte arrays but again some time
it works sometime it does not


plz provide me soln -needed urgently and also if possible tell me reason for error
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 1 2008
Added on Mar 2 2008
2 comments
328 views