To close the stream and flush buffers use the close method.
If you do not call the Close method then the close will be called for you once the object instance goes out of scope.
AppleSingleEncoderStream Class