MCPcopy Create free account
hub / github.com/apache/nutch / startsWith

Method startsWith

src/java/org/apache/nutch/util/Bytes.java:1044–1047  ·  view source on GitHub ↗

Return true if the byte array on the right is a prefix of the byte array on the left.

(byte[] bytes, byte[] prefix)

Source from the content-addressed store, hash-verified

1042 * the left.
1043 */
1044 public static boolean startsWith(byte[] bytes, byte[] prefix) {
1045 return bytes != null && prefix != null && bytes.length >= prefix.length
1046 && compareTo(bytes, 0, prefix.length, prefix, 0, prefix.length) == 0;
1047 }
1048
1049 /**
1050 * @param b

Callers 15

FtpResponseMethod · 0.80
testItMethod · 0.80
walkMethod · 0.80
getJSLinksMethod · 0.80
getRobotRulesSetMethod · 0.80
testItMethod · 0.80
testItMethod · 0.80
startElementMethod · 0.80
openMethod · 0.80
normalizeMethod · 0.80
startElementMethod · 0.80

Calls 1

compareToMethod · 0.95

Tested by 9

testItMethod · 0.64
testItMethod · 0.64
testItMethod · 0.64
acceptMethod · 0.64
readTestFileMethod · 0.64
testLoadPluginsMethod · 0.64
testGetResourcesMethod · 0.64
testRequestMethod · 0.64
testPrefixMatcherMethod · 0.64