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)
| 306 | * versions. |
| 307 | */ |
| 308 | public static PairedStats fromByteArray(byte[] byteArray) { |
| 309 | checkNotNull(byteArray); |
| 310 | checkArgument( |
| 311 | byteArray.length == BYTES, |
| 312 | "Expected PairedStats.BYTES = %s, got %s", |
| 313 | BYTES, |
| 314 | byteArray.length); |
| 315 | ByteBuffer buffer = ByteBuffer.wrap(byteArray).order(ByteOrder.LITTLE_ENDIAN); |
| 316 | Stats xStats = Stats.readFrom(buffer); |
| 317 | Stats yStats = Stats.readFrom(buffer); |
| 318 | double sumOfProductsOfDeltas = buffer.getDouble(); |
| 319 | return new PairedStats(xStats, yStats, sumOfProductsOfDeltas); |
| 320 | } |
| 321 | |
| 322 | private static final long serialVersionUID = 0; |
| 323 | } |
nothing calls this directly
no test coverage detected