public class FileSystemResourceProvider extends Object implements BinaryProvider
| Constructor and Description |
|---|
FileSystemResourceProvider(org.exoplatform.container.xml.InitParams initParams) |
FileSystemResourceProvider(String rootPath) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
boolean |
exists(String name) |
byte[] |
getBytes(String name) |
File |
getFile(String name) |
String |
getFilePath(FileInfo fileInfo) |
String |
getFilePath(String name) |
String |
getLocation() |
File |
getRoot() |
InputStream |
getStream(String name) |
URL |
getURL(String name) |
int |
hashCode() |
long |
lastModified(String name) |
void |
put(FileItem fileItem) |
void |
put(String name,
byte[] data) |
void |
put(String name,
InputStream data)
Write a file to the file system.
|
boolean |
remove(FileInfo fileInfo) |
void |
remove(String name) |
String |
toString() |
protected File root
public FileSystemResourceProvider(String rootPath) throws Exception
Exceptionpublic File getRoot()
public final File getFile(String name) throws IOException
IOExceptionpublic boolean exists(String name) throws IOException
exists in interface BinaryProviderIOExceptionpublic long lastModified(String name) throws IOException
lastModified in interface BinaryProviderIOExceptionpublic URL getURL(String name)
getURL 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 void remove(String name) throws IOException
remove in interface BinaryProviderIOExceptionpublic boolean remove(FileInfo fileInfo) throws IOException
remove in interface BinaryProviderIOExceptionpublic void put(String name, byte[] data) throws IOException
put in interface BinaryProviderIOExceptionpublic void put(String name, InputStream data) throws IOException
put in interface BinaryProvidername - file name.data - inputStreamIOException - ignals that an I/O exception of some sort has occurred.public void put(FileItem fileItem) throws IOException
put in interface BinaryProviderIOExceptionpublic String getLocation()
getLocation in interface BinaryProviderCopyright © 2003–2018 eXo Platform SAS. All rights reserved.