Which stream base class should you extend to implement a custom stream that both reads input and produces transformed output?