<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write_class(self, obj, parent=None):
 """ Writes a class to the stream :param obj: A JavaClass object :param parent: """

        self._writeStruct(">B", 1, (self.TC_CLASS,))
        self.write_classdesc(obj)