The setExpires method of the Cookie class sets the expiration value for a Cookie object.
public void setExpires(wfc.app.Time d);