Creates a Stats 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)
| 582 | |
| 583 | |
| 584 | public static Stats fromByteArray(byte[] byteArray) { |
| 585 | checkNotNull(byteArray); |
| 586 | checkArgument( |
| 587 | byteArray.length == BYTES, |
| 588 | "Expected Stats.BYTES = %s remaining , got %s", |
| 589 | BYTES, |
| 590 | byteArray.length); |
| 591 | return readFrom(ByteBuffer.wrap(byteArray).order(ByteOrder.LITTLE_ENDIAN)); |
| 592 | } |
| 593 | |
| 594 | /** |
| 595 | * Creates a Stats instance from the byte representation read from the given {@link ByteBuffer}. |
nothing calls this directly
no test coverage detected