public static short jsonNodeToShort(JsonNode node, String about) {
        int value = jsonNodeToInt(node, about);
        if ((value < Short.MIN_VALUE) || (value > Short.MAX_VALUE)) {
            throw new RuntimeException(about + ": value " + value +
                " does not fit in a 16-bit signed integer.");
        }
        return (short) value;
    }
Copy a byte buffer into an array.  This will not affect the buffer's
position or mark.
clients/src/main/java/org/apache/kafka/common/protocol/MessageUtil.java