adapt genjava to buffer.h changes