org.nuxeo.ecm.webengine.loader.store
Class FileResourceStore
java.lang.Object
org.nuxeo.ecm.webengine.loader.store.FileResourceStore
- All Implemented Interfaces:
- ResourceStore
public class FileResourceStore
- extends java.lang.Object
- implements ResourceStore
- Author:
- Bogdan Stefanescu
Method Summary |
boolean |
equals(java.lang.Object obj)
|
boolean |
exists(java.lang.String name)
|
byte[] |
getBytes(java.lang.String name)
|
java.io.File |
getFile(java.lang.String name)
|
java.lang.String |
getLocation()
A string that uniquely identify the location of that store. |
java.io.File |
getRoot()
|
java.io.InputStream |
getStream(java.lang.String name)
|
java.net.URL |
getURL(java.lang.String name)
|
int |
hashCode()
|
long |
lastModified(java.lang.String name)
|
void |
put(java.lang.String name,
byte[] data)
|
void |
put(java.lang.String name,
java.io.InputStream data)
|
void |
remove(java.lang.String name)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
FileResourceStore
public FileResourceStore(java.io.File root)
throws java.io.IOException
- Throws:
java.io.IOException
getRoot
public java.io.File getRoot()
getFile
public final java.io.File getFile(java.lang.String name)
exists
public boolean exists(java.lang.String name)
- Specified by:
exists
in interface ResourceStore
lastModified
public long lastModified(java.lang.String name)
- Specified by:
lastModified
in interface ResourceStore
getURL
public java.net.URL getURL(java.lang.String name)
- Specified by:
getURL
in interface ResourceStore
getBytes
public byte[] getBytes(java.lang.String name)
- Specified by:
getBytes
in interface ResourceStore
getStream
public java.io.InputStream getStream(java.lang.String name)
- Specified by:
getStream
in interface ResourceStore
remove
public void remove(java.lang.String name)
- Specified by:
remove
in interface ResourceStore
put
public void put(java.lang.String name,
byte[] data)
throws java.io.IOException
- Specified by:
put
in interface ResourceStore
- Throws:
java.io.IOException
put
public void put(java.lang.String name,
java.io.InputStream data)
throws java.io.IOException
- Specified by:
put
in interface ResourceStore
- Throws:
java.io.IOException
getLocation
public java.lang.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 interface ResourceStore
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2010 Nuxeo SAS. All Rights Reserved.