class UnsignedNumberUtil {

    public static byte[] toBytes(int ushortValue) {
        if (!isWithinUnsignedShort(ushortValue)) {
            throw new IllegalArgumentException(OUT_OF_RANGE_ERROR);
        }
        byte[] bytes = new byte[2];
        bytes[1] = (byte) (0x00ff & (ushortValue));
        bytes[0] = (byte) (0x00ff & (ushortValue >>> 8));
        return bytes;
    }

    private  UnsignedNumberUtil();

}