My server is in python and I'm trying to read and write to socket using ObjectInput/Output Streams whenever i write to socket there is some characters written in socket before my writeObject() command is executed and whenever i tried to read the data from socket using readObject() , it gives java.io.StreamCorruptedException: invalid stream header: 756C3A3A error. What is the problem? i've shown the screen shots of the added characters.
47pirates
9
Junior Poster in Training
Recommended Answers
Jump to PostJava writeObject writes objects in its own format that can be decoded by readObject. It includes headers that describe the content that will follow. You're not going to have much success reading an ObjectOutputStream with anything other than an ObjectInputStream. Conversely you're not going to have much success writing data …
All 3 Replies
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
47pirates
9
Junior Poster in Training
dantinkakkar
19
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.