Revision 44189 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.lib/src/main/java/org/gvsig/fmap/dal/serverexplorer/filesystem/impl/DefaultFilesystemServerExplorer.java
DefaultFilesystemServerExplorer.java | ||
---|---|---|
27 | 27 |
import java.io.FileOutputStream; |
28 | 28 |
import java.io.InputStream; |
29 | 29 |
import java.io.OutputStream; |
30 |
import java.net.MalformedURLException; |
|
31 |
import java.net.URL; |
|
30 | 32 |
import java.util.ArrayList; |
31 | 33 |
import java.util.HashSet; |
32 | 34 |
import java.util.Iterator; |
33 | 35 |
import java.util.List; |
34 | 36 |
import java.util.Set; |
37 |
import java.util.logging.Level; |
|
38 |
import java.util.logging.Logger; |
|
35 | 39 |
import org.apache.commons.io.FilenameUtils; |
36 | 40 |
import org.apache.commons.io.IOUtils; |
41 |
import org.gvsig.fmap.dal.AbstractDataResource; |
|
37 | 42 |
|
38 | 43 |
import org.gvsig.fmap.dal.DALFileLocator; |
39 | 44 |
import org.gvsig.fmap.dal.DALLocator; |
... | ... | |
66 | 71 |
implements FilesystemServerExplorerProviderServices, |
67 | 72 |
FilesystemFileFilter { |
68 | 73 |
|
69 |
private class FileResource implements DataResource { |
|
74 |
private class FileResource |
|
75 |
extends AbstractDataResource |
|
76 |
implements DataResource |
|
77 |
{ |
|
70 | 78 |
|
71 | 79 |
private final File f; |
72 | 80 |
private FileInputStream in; |
... | ... | |
76 | 84 |
this.f = f; |
77 | 85 |
} |
78 | 86 |
|
87 |
public URL getURL() { |
|
88 |
try { |
|
89 |
return this.f.toURI().toURL(); |
|
90 |
} catch (MalformedURLException ex) { |
|
91 |
return null; |
|
92 |
} |
|
93 |
} |
|
94 |
|
|
79 | 95 |
public File getFile() { |
80 | 96 |
return this.f; |
81 | 97 |
} |
Also available in: Unified diff