public boolean verifyConditional ( final String etag , final Date lastModified ) { if ( this . ifModifiedSinceDate != null ) { // The IfModifiedSince has a special helper in HttpURLConnection, use it instead of manually setting the // header. if ( ! lastModified . after ( this . ifModifiedSinceDate ) ) { return false ; } } if ( this . ifUnmodifiedSinceDate != null ) { if ( lastModified . after ( this . ifUnmodifiedSinceDate ) ) { return false ; } } if ( ! Utility . isNullOrEmpty ( this . ifMatchETag ) ) { if ( ! this . ifMatchETag . equals ( etag ) && ! this . ifMatchETag . equals ( "*" ) ) { return false ; } } if ( ! Utility . isNullOrEmpty ( this . ifNoneMatchETag ) ) { if ( this . ifNoneMatchETag . equals ( etag ) ) { return false ; } } return true ; }
RESERVED FOR INTERNAL USE . Verifies the condition is satisfied .