java.io.StreamCorruptedException - Android -


I am developing an application in which the file has been downloaded from the server is encrypted in the application I decrypt it Trying to open an encrypted file stored in internal storage:

  ObjectInputStream ois = New ObjectInputStream (new cipherInputStream (context.openFileInput ("filename"), cipher)); String result = (string) ois.readObject ();   

but getting an exception:

java.io.StreamCorruptedException

This error means in this case Is, and how to fix it?

Thank you.

:

Throwdown when the control information reads from the object stream It was violated, internal stability checks. Basically, what happens, somehow or the other, write and read "get out of the kilter" Here are some ways that can be

  1. Data that was forgotten to turn off the object overputstream (or the wrong stream was off)

  2. Forget to check return value of InputStream.read ().

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -