read/write stream interface

implement file stream
implement memory stream