Lines Matching refs:bytes
48 * The number of bytes required to represent a primitive {@code long}
51 public static final int BYTES = Long.SIZE / Byte.SIZE;
262 * stored in the first 8 bytes of {@code bytes}; equivalent to {@code
263 * ByteBuffer.wrap(bytes).getLong()}. For example, the input byte array
272 * @throws IllegalArgumentException if {@code bytes} has fewer than 8
276 public static long fromByteArray(byte[] bytes) {
277 checkArgument(bytes.length >= BYTES,
278 "array too small: %s < %s", bytes.length, BYTES);
279 return (bytes[0] & 0xFFL) << 56
280 | (bytes[1] & 0xFFL) << 48
281 | (bytes[2] & 0xFFL) << 40
282 | (bytes[3] & 0xFFL) << 32
283 | (bytes[4] & 0xFFL) << 24
284 | (bytes[5] & 0xFFL) << 16
285 | (bytes[6] & 0xFFL) << 8
286 | (bytes[7] & 0xFFL);