MCPcopy Index your code
hub / github.com/antlr/codebuff / fromByteArray

Method fromByteArray

output/java_guava/1.4.18/PairedStats.java:317–328  ·  view source on GitHub ↗

Creates a PairedStats instance from the given byte representation which was obtained by #toByteArray. Note: No guarantees are made regarding stability of the representation between versions.

(byte[] byteArray)

Source from the content-addressed store, hash-verified

315
316
317 public static PairedStats fromByteArray(byte[] byteArray) {
318 checkNotNull(byteArray);
319 checkArgument(byteArray.length == BYTES,
320 "Expected PairedStats.BYTES = %s, got %s",
321 BYTES,
322 byteArray.length);
323 ByteBuffer buffer = ByteBuffer.wrap(byteArray).order(ByteOrder.LITTLE_ENDIAN);
324 Stats xStats = Stats.readFrom(buffer);
325 Stats yStats = Stats.readFrom(buffer);
326 double sumOfProductsOfDeltas = buffer.getDouble();
327 return new PairedStats(xStats, yStats, sumOfProductsOfDeltas);
328 }
329
330 private static final long serialVersionUID = 0;
331}

Callers

nothing calls this directly

Calls 4

readFromMethod · 0.95
checkNotNullMethod · 0.45
checkArgumentMethod · 0.45
wrapMethod · 0.45

Tested by

no test coverage detected