gvsig-tools / org.gvsig.tools / library / trunk / org.gvsig.tools / org.gvsig.tools.lib / src / main / java / org / gvsig / tools / resourcesstorage / ResourcesStorage.java @ 1947
History | View | Annotate | Download (1.32 KB)
1 | 1893 | jjdelcerro | package org.gvsig.tools.resourcesstorage; |
---|---|---|---|
2 | 1881 | jjdelcerro | |
3 | import java.io.Closeable; |
||
4 | import java.io.IOException; |
||
5 | import java.io.InputStream; |
||
6 | import java.io.OutputStream; |
||
7 | import java.net.URL; |
||
8 | 1888 | jjdelcerro | import java.util.List; |
9 | 1881 | jjdelcerro | |
10 | /**
|
||
11 | *
|
||
12 | * @author jjdelcerro
|
||
13 | */
|
||
14 | public interface ResourcesStorage { |
||
15 | |||
16 | public interface Resource extends Closeable { |
||
17 | 1893 | jjdelcerro | /**
|
18 | * El recurso es de solo lectura, normalmente por que el tipo de recurso
|
||
19 | * no permite escribir sobre el.
|
||
20 | *
|
||
21 | * Podria devolver false, y a pesar de ello no poder escribir, normalmente
|
||
22 | * por carecer de permisos para ello.
|
||
23 | *
|
||
24 | * @return
|
||
25 | */
|
||
26 | public boolean isReadOnly(); |
||
27 | |||
28 | 1881 | jjdelcerro | public URL getURL(); |
29 | |||
30 | public boolean exists(); |
||
31 | |||
32 | public InputStream asInputStream() throws IOException; |
||
33 | |||
34 | public OutputStream asOutputStream() throws IOException; |
||
35 | |||
36 | @Override
|
||
37 | public void close(); |
||
38 | } |
||
39 | |||
40 | 1893 | jjdelcerro | public Resource getResource(String resourceName); |
41 | 1881 | jjdelcerro | |
42 | 1893 | jjdelcerro | public List<Resource> getResources(String resourceName); |
43 | 1888 | jjdelcerro | |
44 | 1947 | jjdelcerro | public Resource getLocalizedResource(String resourceName); |
45 | |||
46 | public List<Resource> getLocalizedResources(String resourceName); |
||
47 | |||
48 | 1893 | jjdelcerro | public boolean isEmpty(); |
49 | |||
50 | public boolean isReadOnly(); |
||
51 | |||
52 | public boolean exists(String resourceName); |
||
53 | 1881 | jjdelcerro | } |