Hi,
FileInputStream fis = new FileInputStream("c:\\nonav.log");
ObjectInputStream ois = new ObjectInputStream(fis);
String today = (String) ois.readObject();
byte[] bytedata= today.getBytes();
Above code i am getting below exception:
java.io.StreamCorruptedException: invalid stream header
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:768)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:283)
at com.ibm.test.ReadZipPObjectinputstream.main(ReadZipPObjectinputstream.java:56)
Please help me in resolving the issue.
Thanks,
Viswanath