Class FileResourceStore
- java.lang.Object
-
- org.nuxeo.ecm.webengine.loader.store.FileResourceStore
-
- All Implemented Interfaces:
ResourceStore
public class FileResourceStore extends Object implements ResourceStore
- Author:
- Bogdan Stefanescu
-
-
Constructor Summary
Constructors Constructor Description FileResourceStore(File root)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
boolean
exists(String name)
byte[]
getBytes(String name)
File
getFile(String name)
String
getLocation()
A string that uniquely identify the location of that store.File
getRoot()
InputStream
getStream(String name)
URL
getURL(String name)
int
hashCode()
long
lastModified(String name)
void
put(String name, byte[] data)
void
put(String name, InputStream data)
void
remove(String name)
String
toString()
-
-
-
Field Detail
-
root
protected File root
-
-
Constructor Detail
-
FileResourceStore
public FileResourceStore(File root) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getRoot
public File getRoot()
-
exists
public boolean exists(String name)
- Specified by:
exists
in interfaceResourceStore
-
lastModified
public long lastModified(String name)
- Specified by:
lastModified
in interfaceResourceStore
-
getURL
public URL getURL(String name)
- Specified by:
getURL
in interfaceResourceStore
-
getBytes
public byte[] getBytes(String name)
- Specified by:
getBytes
in interfaceResourceStore
-
getStream
public InputStream getStream(String name)
- Specified by:
getStream
in interfaceResourceStore
-
remove
public void remove(String name)
- Specified by:
remove
in interfaceResourceStore
-
put
public void put(String name, byte[] data) throws IOException
- Specified by:
put
in interfaceResourceStore
- Throws:
IOException
-
put
public void put(String name, InputStream data) throws IOException
- Specified by:
put
in interfaceResourceStore
- Throws:
IOException
-
getLocation
public String getLocation()
Description copied from interface:ResourceStore
A string that uniquely identify the location of that store. Two stores are considered equals if their locations are the same.- Specified by:
getLocation
in interfaceResourceStore
-
-