Updating index template

Hi All,
How can I update already existing template on a index using Java client. Basically I want to add a new field into default templet.