question: public boolean endsWith ( final String str ) { if ( str == null ) { return false ; } final int len = str . length ( ) ; if ( len == 0 ) { return true ; } if ( len > size ) { return false ; } int pos = size - len ; for ( int i = 0 ; i < len ; i ++ , pos ++ ) { if ( buffer [ pos ] != str . charAt ( i ) ) { return false ; } } return true ; }
target:  Checks whether this builder ends with the specified string. <p> Note that this method handles null input quietly, unlike String.