• Post Reply Bookmark Topic Watch Topic
  • New Topic

reseting an objectinputstream

 
Ole Kristian
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!