I am able to find how to convert android.net.Uri to Java.net.URI here but not vice-versa.
So after spending some time I figured it out. Here is the solution(If there is another solution then please post that as well)
First convert javaURI to string and then use android.net.Uri's parse function
android.net.URI androidUri = android.net.Uri.parse(javaURI.toString());