public boolean startsWith ( Bytes prefix ) { Objects . requireNonNull ( prefix , "startWith(Bytes prefix) cannot have null parameter" ) ; if ( prefix . length > this . length ) { return false ; } else { int end = this . offset + prefix . length ; for ( int i = this . offset , j = prefix . offset ; i < end ; i ++ , j ++ ) { if ( this . data [ i ] != prefix . data [ j ] ) { return false ; } } } return true ; }
Checks if this has the passed prefix