Convert the MSPDI representation of a UUID into a Java UUID instance.

@param value MSPDI UUID
@return Java UUID instance
513030
public static final UUID parseUUID(String value)
   {
      return value == null || value.isEmpty() ? null : UUID.fromString(value);
   }
739177
public static final String printResourceUID(Integer value)
   {
      ProjectFile file = PARENT_FILE.get();
      if (file != null)
      {
         file.getEventManager().fireResourceWrittenEvent(file.getResourceByUniqueID(value));
      }
      return (value.toString());
   }
779877
public static UByte ubyte(String value) throws NumberFormatException {
        return value == null ? null : UByte.valueOf(value);
    }
520279
public static int generate(String value)
  {
    int len = value.length();
    int crc = 0;

    for (int i = 0; i < len; i++) {
      crc = next(crc, value.charAt(i));
    }

    return crc;
  }
456976
public function convertToDatabaseValue($value, AbstractPlatform $platform)
    {
        if (empty($value)) {
            return null;
        }

        if ($value instanceof UuidInterface) {
            return $value->getBytes();
        }

        try {
            if (is_string($value) || method_exists($value, '__toString')) {
                return Uuid::fromString((string) $value)->getBytes();
            }
        } catch (InvalidArgumentException $e) {
            // Ignore the exception and pass through.
        }

        throw ConversionException::conversionFailed($value, static::NAME);
    }
1232954
@VisibleForTesting
    static UUID bytesToUUID(byte[] data) {
        long msb = 0;
        long lsb = 0;
        assert data.length == 16 : "data must be 16 bytes in length";
        for (int i = 0; i < 8; i++) {
            msb = (msb << 8) | (data[i] & 0xff);
        }
        for (int i = 8; i < 16; i++) {
            lsb = (lsb << 8) | (data[i] & 0xff);
        }
        return new UUID(msb, lsb);
    }
188153
public String addUnits( String value ) {

		StringBuffer buff = new StringBuffer(100);
		
		long bytes = Long.parseLong(value);

		if( bytes < 1000000 ) {
			
			buff.append(value);
			buff.append("B");
			
		} else {
			
			int unit = 1000;
			int exp = (int) (Math.log(bytes) / Math.log(unit));
			String pre = "kMGTPE".charAt(exp-1)+"";
			String ov = String.format("%.1f%sB", bytes / Math.pow(unit, exp), pre);
			buff.append(ov);
			
		}

		return buff.toString();
		
	}
835701
public static int writeUUID(byte[] target, int offset, UUID value) {
        writeLong(target, offset, value.getMostSignificantBits());
        writeLong(target, offset + Long.BYTES, value.getLeastSignificantBits());
        return 2 * Long.BYTES;
    }
1190842
public static byte[] asciiBytes(String value) {
    Preconditions.checkNotNull(value);
    try {
      return value.getBytes("ASCII");
    } catch (UnsupportedEncodingException uee) {
      // won't happen
      throw new RuntimeException("ASCII not found!", uee);
    }
  }
1033552
public KeyOperationsParameters withValue(byte[] value) {
        if (value == null) {
            this.value = null;
        } else {
            this.value = Base64Url.encode(value);
        }
        return this;
    }
50028
public static TypedValue untypedValue(Object value) {
    if (value instanceof TypedValue) {
      return untypedValue(value, ((TypedValue) value).isTransient());
    }
    else return untypedValue(value, false);
  }
820066
public final void setGuaranteedStreamUUID(SIBUuid12 value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setGuaranteedStreamUUID", value);
        if (value != null)
            getHdr2().setField(JsHdr2Access.GUARANTEED_SET_STREAMUUID, value.toByteArray());
        else
            getHdr2().setField(JsHdr2Access.GUARANTEED_SET_STREAMUUID, null);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setGuaranteedStreamUUID");
    }
161872
def uuid(value = nil)
      if value.nil?
        timeuuid_generator.now
      elsif value.is_a?(Time)
        timeuuid_generator.at(value)
      elsif value.is_a?(DateTime)
        timeuuid_generator.at(Time.at(value.to_f))
      else
        Type::Timeuuid.instance.cast(value)
      end
    end
530311
public java.sql.Blob getBlob(final Object value) throws SQLException {
            if (value instanceof java.sql.Blob) return (java.sql.Blob) value;

            if (value instanceof byte[]) {
                return new SerialBlob((byte[]) value);
            }
680425
static public function uuid($value, $message = null, $propertyPath = null)
        {
            $value = str_replace(
                array(
                    'urn:',
                    'uuid:',
                    '{', '}'
                ),
                '',
                $value
            );

            if ($value === '00000000-0000-0000-0000-000000000000') {
                return;
            }

            if (!preg_match('/^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[1-5][0-9A-Fa-f]{3}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$/', $value)) {
                $message = $message ?: sprintf(
                    'Value "%s" is not a valid UUID.',
                    static::stringify($value)
                );

                throw static::createException($value, $message, static::INVALID_UUID, $propertyPath);
            }
        }
95847
public function convertToDatabaseValue($value, AbstractPlatform $platform)
    {
        if (empty($value)) {
            return null;
        }

        if ($value instanceof UuidInterface) {
            return $this->encode($value);
        }

        try {
            if (is_string($value) || method_exists($value, '__toString')) {
                $uuid = $this->getUuidFactory()->fromString((string) $value);

                return $this->encode($uuid);
            }
        } catch (InvalidArgumentException $e) {
            // Ignore the exception and pass through.
        }

        throw ConversionException::conversionFailed($value, self::NAME);
    }
1029758
public static SassValue convertToSassValue(Object value) {
    if (null == value) {
      return SassNull.SINGLETON;
    }

    if (value instanceof SassValue) {
      return (SassValue) value;
    }

    Class cls = value.getClass();

    if (isaBoolean(cls)) {
      return new SassBoolean((Boolean) value);
    }

    if (isaNumber(cls)) {
      return new SassNumber(((Number) value).doubleValue(), "");
    }

    if (isaString(cls) || isaCharacter(cls)) {
      return new SassString(value.toString());
    }

    if (value instanceof Collection) {
      return new SassList(
          ((Collection<?>) value)
              .stream()
              .map(TypeUtils::convertToSassValue)
              .collect(Collectors.toList())
      );
    }

    if (value instanceof Map) {
      return ((Map<?, ?>) value).entrySet()
          .stream()
          .collect(Collectors.toMap(
              entry -> entry.getKey().toString(),
              entry -> TypeUtils.convertToSassValue(entry.getValue()),
              (origin, duplicate) -> origin,
              SassMap::new
          ));
    }

    if (value instanceof Throwable) {
      Throwable throwable = (Throwable) value;
      StringWriter stringWriter = new StringWriter();
      PrintWriter printWriter = new PrintWriter(stringWriter);

      String message = throwable.getMessage();
      if (StringUtils.isNotEmpty(message)) {
        printWriter.append(message).append(System.lineSeparator());
      }
      throwable.printStackTrace(printWriter);

      return new SassError(stringWriter.toString());
    }

    return new SassError(
        String.format(
            "Could not convert object of type %s into a sass value",
            value.getClass().toString()
        )
    );
  }