def __init__(self, payload):
        """Parse LOB header from payload"""
        raw_header_p1 = payload.read(self.header_struct_part1.size)
        self.lob_type, self.options = self.header_struct_part1.unpack(raw_header_p1)

        if not self.isnull():
            raw_header_p2 = payload.read(self.header_struct_part2.size)
            header = self.header_struct_part2.unpack(raw_header_p2)
            (reserved, self.char_length, self.byte_length, self.locator_id, self.chunk_length) = header

            # Set total_lob_length attribute differently for binary and character lobs:
            self.total_lob_length = self.byte_length if self.lob_type == self.BLOB_TYPE else self.char_length
def __init__ ( self , payload ) : raw_header_p1 = payload . read ( self . header_struct_part1 . size ) self . lob_type , self . options = self . header_struct_part1 . unpack ( raw_header_p1 ) if not self . isnull ( ) : raw_header_p2 = payload . read ( self . header_struct_part2 . size ) header = self . header_struct_part2 . unpack ( raw_header_p2 ) ( reserved , self . char_length , self . byte_length , self . locator_id , self . chunk_length ) = header self . total_lob_length = self . byte_length if self . lob_type == self . BLOB_TYPE else self . char_length
Parse LOB header from payload