Creates a new File
instance by converting the given
file:
URI into an abstract pathname.
The exact form of a file:
URI is system-dependent, hence
the transformation performed by this constructor is also
system-dependent.
For a given abstract pathname f it is guaranteed that
so long as the original abstract pathname, the URI, and the new abstract pathname are all created in (possibly different invocations of) the same Java virtual machine. This relationship typically does not hold, however, when anew File(
f.
ftoURI()
()).equals(.
getAbsoluteFile
())
file:
URI that is created in a virtual machine
on one operating system is converted into an abstract pathname in a
virtual machine on a different operating system.
uri
| An absolute, hierarchical URI with a scheme equal to
"file" , a non-empty path component, and undefined
authority, query, and fragment components |
NullPointerException
| If uri is null | |
IllegalArgumentException
| If the preconditions on the parameter do not hold |
toURI(), java.net.URI
Diagram: File