Add read() and write() methods to iterators