Home | History | Annotate | Download | only in primitives

Lines Matching refs:bytes

48    * The number of bytes required to represent a primitive {@code char}
51 public static final int BYTES = Character.SIZE / Byte.SIZE;
286 * stored in the first 2 bytes of {@code bytes}; equivalent to {@code
287 * ByteBuffer.wrap(bytes).getChar()}. For example, the input byte array
293 * @throws IllegalArgumentException if {@code bytes} has fewer than 2
297 public static char fromByteArray(byte[] bytes) {
298 checkArgument(bytes.length >= BYTES,
299 "array too small: %s < %s", bytes.length, BYTES);
300 return (char) ((bytes[0] << 8) | (bytes[1] & 0xFF));