'Returns record as a string.
Example usage:
>>> record = mx.recordio.MXRecordIO(\'tmp.rec\', \'r\')
>>> for i in range(5):
...    item = record.read()
...    print(item)
record_0
record_1
record_2
record_3
record_4
>>> record.close()
Returns
buf : string
Buffer read.'

def read(self):

    assert (not self.writable)
    buf = ctypes.c_char_p()
    size = ctypes.c_size_t()
    check_call(_LIB.MXRecordIOReaderReadRecord(self.handle, ctypes.byref(buf), ctypes.byref(size)))
    if buf:
        buf = ctypes.cast(buf, ctypes.POINTER((ctypes.c_char * size.value)))
        return buf.contents.raw
    else:
        return None
