public class MemoryProvider extends Object implements BinaryProvider
| Modifier and Type | Field and Description |
|---|---|
protected String |
location |
protected Map<String,byte[]> |
store |
| Constructor and Description |
|---|
MemoryProvider() |
MemoryProvider(Map<String,byte[]> store) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
exists(String name) |
byte[] |
getBytes(String name) |
String |
getFilePath(FileInfo fileInfo) |
String |
getFilePath(String name) |
String |
getLocation() |
InputStream |
getStream(String name) |
URL |
getURL(String name) |
long |
lastModified(String name) |
void |
put(FileItem fileItem) |
void |
put(String name,
byte[] data) |
void |
put(String name,
InputStream data) |
boolean |
remove(FileInfo fileInfo) |
void |
remove(String name) |
String |
toString() |
public boolean exists(String name)
exists in interface BinaryProviderpublic byte[] getBytes(String name)
getBytes in interface BinaryProviderpublic InputStream getStream(String name)
getStream in interface BinaryProviderpublic String getFilePath(FileInfo fileInfo) throws IOException
getFilePath in interface BinaryProviderIOExceptionpublic String getFilePath(String name) throws IOException
getFilePath in interface BinaryProviderIOExceptionpublic URL getURL(String name)
getURL in interface BinaryProviderpublic long lastModified(String name)
lastModified in interface BinaryProviderpublic void put(String name, InputStream data) throws IOException
put in interface BinaryProviderIOExceptionpublic void put(FileItem fileItem) throws IOException
put in interface BinaryProviderIOExceptionpublic void put(String name, byte[] data) throws IOException
put in interface BinaryProviderIOExceptionpublic void remove(String name)
remove in interface BinaryProviderpublic boolean remove(FileInfo fileInfo) throws FileNotFoundException
remove in interface BinaryProviderFileNotFoundExceptionpublic String getLocation()
getLocation in interface BinaryProviderCopyright © 2003–2017 eXo Platform SAS. All rights reserved.