def load(self, value_type: type):
"""
Reads and returns an instance of the value_type from the following offset or returns None if the read offset is
0.
:param value_type: The type of the instance to read.
:return: The instance or None.
"""
offset = self.read_offset()
if not offset:
return None
with self.temporary_seek(offset, io.SEEK_SET):
return self._read_res_data(value_type)
评论列表
文章目录