Hack in enough of the stream interface