transfering of image files especially jpeg over tcp/ip in java
843790Mar 2 2008 — edited Mar 4 2008hi, 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