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 booleanequals(Object obj)booleanexists(String name)byte[]getBytes(String name)FilegetFile(String name)StringgetLocation()A string that uniquely identify the location of that store.FilegetRoot()InputStreamgetStream(String name)URLgetURL(String name)inthashCode()longlastModified(String name)voidput(String name, byte[] data)voidput(String name, InputStream data)voidremove(String name)StringtoString()
-
-
-
Constructor Detail
-
FileResourceStore
public FileResourceStore(File root) throws IOException
- Throws:
IOException
-
-
Method Detail
-
exists
public boolean exists(String name)
- Specified by:
existsin interfaceResourceStore
-
lastModified
public long lastModified(String name)
- Specified by:
lastModifiedin interfaceResourceStore
-
getURL
public URL getURL(String name)
- Specified by:
getURLin interfaceResourceStore
-
getBytes
public byte[] getBytes(String name)
- Specified by:
getBytesin interfaceResourceStore
-
getStream
public InputStream getStream(String name)
- Specified by:
getStreamin interfaceResourceStore
-
remove
public void remove(String name)
- Specified by:
removein interfaceResourceStore
-
put
public void put(String name, byte[] data) throws IOException
- Specified by:
putin interfaceResourceStore- Throws:
IOException
-
put
public void put(String name, InputStream data) throws IOException
- Specified by:
putin interfaceResourceStore- Throws:
IOException
-
getLocation
public String getLocation()
Description copied from interface:ResourceStoreA string that uniquely identify the location of that store. Two stores are considered equals if their locations are the same.- Specified by:
getLocationin interfaceResourceStore
-
-