|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectDataUtilities
public class DataUtilities
Part of DataUtilities from gt-main, which cannot be used here because of cyclic Maven dependencies.
FIXME: module dependencies should be refactored until this class does not need to exist.
Constructor Summary | |
---|---|
DataUtilities()
|
Method Summary | |
---|---|
static URL |
fileToURL(File file)
A replacement for File.toURI().toURL(). |
static File |
urlToFile(URL url)
Copy of DataUtilities.urlToFile(URL url) in gt-main, which cannot be used here because of cyclic Maven dependencies. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DataUtilities()
Method Detail |
---|
public static File urlToFile(URL url)
public static URL fileToURL(File file)
The handling of file.toURL() is broken; the handling of file.toURI().toURL() is known to be broken on a few platforms like mac. We have the urlToFile( URL ) method that is able to untangle both these problems and we use it in the geotools library.
However occasionally we need to pick up a file and hand it to a third party library like EMF; this method performs a couple of sanity checks which we can use to prepare a good URL reference to a file in these situtations.
file
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |