public static Map < String , String > createCookiesMap ( HttpServletRequest request ) { Map < String , String > cookiesMap = new HashMap < String , String > ( ) ; Cookie [ ] cookies = request . getCookies ( ) ; if ( ArrayUtils . isNotEmpty ( cookies ) ) { for ( Cookie cookie : request . getCookies ( ) ) { cookiesMap . put ( cookie . getName ( ) , cookie . getValue ( ) ) ; } } return cookiesMap ; }
Creates a map from the cookies in the specified request .