Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

save file

  Asked By: Harry    Date: Oct 20    Category: Java    Views: 879

i want to store pdf files in server. that's name must be unic. in asp i use
System.GuId.NewGuid().ToString(), this method generate one hexadecimal digit, that
have 16 figure and is random and probably(most probably) is unic. we can append this
code to my pdf file name and result is one unic name. is there same method in java? if
there isn't, do you know how can do this work?



1 Answer Found

Answer #1    Answered By: Keith Marshall     Answered On: Oct 20

you can use :

String id = UUID.randomUUID().toString();

if your project's jdk is 1.5 or you can use


Didn't find what you were looking for? Find more on save file Or get search suggestion and latest updates.