Hi! I wondering how to reset an objectinputstream so I can start reading from the beginning again. Is there another way but to close the objectinputstream and open it again?
posted 15 years ago
No, that's pretty much it I believe. Of course, that assumes that you can reopen the stream for replay. IF it's a file, sure you can - but if you were reading from a socket, those bytes are gone. So if that's the case, you should probably save to a file before you try reading, if you need to be able to replay fro soe reason.