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 ther
uri = Uri.parse(mFile.toString());