public void add ( URI uri , HttpCookie cookie ) { // pre-condition : argument can't be null if ( cookie == null ) { throw new NullPointerException ( "cookie is null" ) ; } lock . lock ( ) ; try { if ( cookie . getMaxAge ( ) != 0 ) { addIndex ( uriIndex , getEffectiveURI ( uri ) , cookie ) ; } } finally { lock . unlock ( ) ; } }
Add one cookie into cookie store .