0

I am making a connection from Android client to Servlet using url connection. I am sending a string to server on button click.Server is receiving string and able to print it. When the Servlet sends response as a string, The Android Client Client is showing the following Exceoption
java.io.StreamCorrupted Exception
What can be the reason for such an exception?

1 Answer 1

1

This exception will be thrown if the expected input stream is not proper.

For example:

If the expected input stream on the client side is ObjectInputStream and the server is not writing using ObjectOutputStream.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.