Add setStreamHandler method.