MCPcopy Create free account
hub / github.com/antlr/codebuff / fromBytes

Method fromBytes

output/java_guava/1.4.16/HashCode.java:261–264  ·  view source on GitHub ↗

Creates a HashCode from a byte array. The array is defensively copied to preserve the immutability contract of HashCode. The array cannot be empty. @since 15.0 (since 12.0 in HashCodes)

(byte[] bytes)

Source from the content-addressed store, hash-verified

259
260
261 public static HashCode fromBytes(byte[] bytes) {
262 checkArgument(bytes.length >= 1, "A HashCode must contain at least 1 byte.");
263 return fromBytesNoCopy(bytes.clone());
264 }
265
266 /**
267 * Creates a {@code HashCode} from a byte array. The array is <i>not</i> copied defensively, so it

Callers

nothing calls this directly

Calls 3

fromBytesNoCopyMethod · 0.95
checkArgumentMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected