Home | History | Annotate | Download | only in primitives

Lines Matching defs:BYTES

48    * The number of bytes required to represent a primitive {@code short}
51 public static final int BYTES = Short.SIZE / Byte.SIZE;
295 * stored in the first 2 bytes of {@code bytes}; equivalent to {@code
296 * ByteBuffer.wrap(bytes).getShort()}. For example, the input byte array
302 * @throws IllegalArgumentException if {@code bytes} has fewer than 2
306 public static short fromByteArray(byte[] bytes) {
307 checkArgument(bytes.length >= BYTES,
308 "array too small: %s < %s", bytes.length, BYTES);
309 return fromBytes(bytes[0], bytes[1]);
314 * bytes, in big-endian order; equivalent to {@code Shorts.fromByteArray(new