Add Buffer class extension