question: private NewCookie createWsCookie ( String cookieName , String token , boolean setMaxAge , String userAgent ) { String ieExpires = "" ; int maxAge = setMaxAge ? _tokenManager . getMaxTokenLifeTimeInSecs ( ) : NewCookie . DEFAULT_MAX_AGE ; if ( setMaxAge && StringUtils . contains ( userAgent , "MSIE" ) ) { ieExpires = ";expires=" + getExpiredTimeGMT ( maxAge ) ; _log . debug ( "Expires: " + ieExpires ) ; } if ( token != null && ! token . isEmpty ( ) ) { return new NewCookie ( cookieName , token + ";HttpOnly" + ieExpires , null , null , null , maxAge , true ) ; } return null ; }
target:  Create and return a Cookie object with the token