java


How Convert Microsoft GUID to JAVA UUID?


I need to communicate a Guid that was generated in .NET to a Java application.
This is my GUID
ce095552-b466-4d03-ac41-430ec9286806
and I want to set it to UUID variable !
UUID.nameUUIDFromBytes(stringUUID.getBytes())
UUID.fromString(stringUUID)
I am getting error
Caused by: java.lang.NumberFormatException: Invalid long: ""ce095552"
how can I cast GUID to UUID?
UUID.fromString() works fine:
String guid = "ce095552-b466-4d03-ac41-430ec9286806";
UUID uuid = UUID.fromString(guid);
System.out.println(uuid);
Invalid long: ""ce095552"
Looks like the GUID you are passing to UUID.fromString still includes quotes ("). Make sure the GUID string does not include any additional characters and it should work.

Related Links

How to write guaranteed deadlock via wait/notify
Calculating levenshtein distance between two strings
Send authorization header with every request in webview using okhttp in android
Firebase - How to make sure Authentication for an already authenticated user doesn't happen again?
how to autowire service in excelBuilder class in spring mvc
can't insert special character from java program to oracle 11g database
Increment a count variable in RenderScript
How do I use JAXB annotations with Spring RestTemplate?
Weka illegal options : -C 1.0 -L 0.001 -P 1.0E-12 -N 2 -M -V -1 -W 1
Controller method not getting called in spring mvc
Cannot resolve method 'getInstance()'
Wrong time selected with timepickerdialog
How to access the entry at '0' position in an AppCompatSpinner in order to change it's text?
Creating simple hangman program in java, trouble with for loop
Why won't my Java JDBC to Firebird database connection disconnect?
Serialization of an object type enum contained in a serializable class

Categories

HOME
ionic-framework
date
zeromq
image-processing
pycharm
lodash
webstorm
rsyslog
amazon-ecs
rubygems
rdf
fsm
alpha
append
node-notifier
synchronization
communication
vault
leiningen
circuit
carthage
dosgi
graphlab
windows-7-x64
propel
undefined
jtextfield
amazonsellercentral
clickonce
extjs5
bootstrap-duallistbox
sql-server-2012-express
javascriptcore
google-sites-2016
google-qpx-express-api
accelerate-framework
host
wixsharp
serve
retina-display
x11-forwarding
gesture
dynamics-crm-2013
occlusion
objectlistview
service-discovery
hue
temporary-files
graphenedb
galen
fedex
gzipstream
grid.mvc
texmaker
spring-security-kerberos
mime
clean-architecture
celery-task
nbconvert
vtigercrm
smart-table
quartz-composer
pintos
angular-strap
probability-density
sts-springsourcetoolsuite
underscore.js-templating
etsy
react-native-listview
make-install
unity-networking
comobject
qdialog
content-length
angular-leaflet-directive
ionic
twirl
splash
processmodel
cisco-ios
system32
clicktag
pick
xc16
gadt
asp.net-dynamic-data
java.util.concurrent
file-copying
device-manager
internet-connection
html-helper
castle
oam
easy-install
android-screen-support
interface-orientation
robotics-studio
selected
pysimplesoap
hosts-file
reddot
amazon-appstore
assembly-loading
cufon
eclipse-templates
subgurim-maps
krl
propagation
castle-monorail
web-architecture
nintendo-ds
brewmp
data-driven
ctp4
noscript
thread-local-storage
lzh

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App