Add Stream class to hide serialization stream implementation