public static byte[] toBytes(short val) {
        byte[] b = new byte[SIZEOF_SHORT];
        b[1] = (byte) val;
        val >>= 8;
        b[0] = (byte) val;
        return b;
    }
Convert a short value to a byte array of {@link #SIZEOF_SHORT} bytes long.

@param val value
@return the byte array
stroom-bytebuffer/src/main/java/stroom/bytebuffer/hbase/Bytes.java