Compliance with the new stream interface