public static class FilesResourcesStorage.FileResource extends AbstractResourcesStorage.AbstractResource implements ResourcesStorage.Resource, HasAFile
name| Constructor and Description |
|---|
FileResource(java.lang.String name,
java.io.File resource) |
| Modifier and Type | Method and Description |
|---|---|
java.io.InputStream |
asInputStream() |
java.io.OutputStream |
asOutputStream() |
void |
close() |
boolean |
exists() |
java.io.File |
getFile() |
java.lang.String |
getName()
Return the name of the resource.
|
java.net.URL |
getURL() |
boolean |
isReadOnly()
El recurso es de solo lectura, normalmente por que el tipo de recurso
no permite escribir sobre el.
|
void |
setFile(java.io.File file) |
public java.lang.String getName()
ResourcesStorage.ResourcegetName in interface ResourcesStorage.ResourcegetName in class AbstractResourcesStorage.AbstractResourcepublic boolean isReadOnly()
ResourcesStorage.ResourceisReadOnly in interface ResourcesStorage.Resourcepublic java.net.URL getURL()
getURL in interface ResourcesStorage.Resourcepublic boolean exists()
exists in interface ResourcesStorage.Resourcepublic java.io.InputStream asInputStream()
throws java.io.FileNotFoundException
asInputStream in interface ResourcesStorage.Resourcejava.io.FileNotFoundExceptionpublic java.io.OutputStream asOutputStream()
throws java.io.FileNotFoundException
asOutputStream in interface ResourcesStorage.Resourcejava.io.FileNotFoundExceptionpublic void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface ResourcesStorage.Resource