[Java] Put back having a header per log buffer due to a race on rotation.