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)
| 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 | } |
nothing calls this directly
no test coverage detected