Returns the length value of the specified array, stored in the first four bytes. @param array input array @return array length
(final byte[] array)
| 108 | * @return array length |
| 109 | */ |
| 110 | public static int size(final byte[] array) { |
| 111 | return ((array[0] & 0xFF) << 24) + ((array[1] & 0xFF) << 16) + |
| 112 | ((array[2] & 0xFF) << 8) + (array[3] & 0xFF); |
| 113 | } |
| 114 | |
| 115 | /** |
| 116 | * Stores the specified length value in the first bytes of the specified array. |
no outgoing calls
no test coverage detected