/** * add from a token * @param recipe - the recipe to use * @param token - the token to use * @param equalsIndex - the position of the equal sign */ void addTokenWithEqualsSign( CookieRecipe recipe, String token, int equalsIndex ) { String name = token.substring( 0, equalsIndex ).trim(); String value= token.substring( equalsIndex + 1 ).trim(); _value.insert( 0, value ); if (recipe.isCookieAttribute( name.toLowerCase() )) { _attributes.put( name.toLowerCase(), _value.toString() ); } else { addCookieIfValid( new Cookie( name, _value.toString(), _attributes ) ); _attributes.clear(); } _value.setLength(0); }
/** * add from a token * @param recipe - the recipe to use * @param token - the token to use * @param equalsIndex - the position of the equal sign */ void addTokenWithEqualsSign( CookieRecipe recipe, String token, int equalsIndex ) { String name = token.substring( 0, equalsIndex ).trim(); String value= token.substring( equalsIndex + 1 ).trim(); _value.insert( 0, value ); if (recipe.isCookieAttribute( name.toLowerCase() )) { _attributes.put( name.toLowerCase(), _value.toString() ); } else { addCookieIfValid( new Cookie( name, _value.toString(), _attributes ) ); _attributes.clear(); } _value.setLength(0); }
/** * add from a token * @param recipe - the recipe to use * @param token - the token to use * @param equalsIndex - the position of the equal sign */ void addTokenWithEqualsSign( CookieRecipe recipe, String token, int equalsIndex ) { String name = token.substring( 0, equalsIndex ).trim(); String value= token.substring( equalsIndex + 1 ).trim(); _value.insert( 0, value ); if (recipe.isCookieAttribute( name.toLowerCase() )) { _attributes.put( name.toLowerCase(), _value.toString() ); } else { addCookieIfValid( new Cookie( name, _value.toString(), _attributes ) ); _attributes.clear(); } _value.setLength(0); }