Creates a Stats instance from the given byte representation which was obtained by {@link #toByteArray}. <p><b>Note:</b> No guarantees are made regarding stability of the representation between versions.
(byte[] byteArray)
| 625 | * versions. |
| 626 | */ |
| 627 | public static Stats fromByteArray(byte[] byteArray) { |
| 628 | checkNotNull(byteArray); |
| 629 | checkArgument( |
| 630 | byteArray.length == BYTES, |
| 631 | "Expected Stats.BYTES = %s remaining , got %s", |
| 632 | BYTES, |
| 633 | byteArray.length); |
| 634 | return readFrom(ByteBuffer.wrap(byteArray).order(ByteOrder.LITTLE_ENDIAN)); |
| 635 | } |
| 636 | |
| 637 | /** |
| 638 | * Creates a Stats instance from the byte representation read from the given {@link ByteBuffer}. |