public class GridFsStoreResource extends Object implements org.springframework.core.io.Resource, org.springframework.core.io.WritableResource, DeletableResource
| Constructor and Description |
|---|
GridFsStoreResource(org.springframework.core.io.Resource delegate,
org.springframework.data.mongodb.gridfs.GridFsTemplate gridfs) |
GridFsStoreResource(String location,
org.springframework.data.mongodb.gridfs.GridFsTemplate gridfs) |
| Modifier and Type | Method and Description |
|---|---|
long |
contentLength() |
org.springframework.core.io.Resource |
createRelative(String relativePath) |
void |
delete() |
boolean |
exists() |
String |
getContentType() |
String |
getDescription() |
File |
getFile() |
String |
getFilename() |
Object |
getId() |
InputStream |
getInputStream() |
OutputStream |
getOutputStream() |
URI |
getURI() |
URL |
getURL() |
boolean |
isOpen() |
boolean |
isReadable() |
boolean |
isWritable() |
long |
lastModified() |
String |
toString() |
public GridFsStoreResource(org.springframework.core.io.Resource delegate,
org.springframework.data.mongodb.gridfs.GridFsTemplate gridfs)
public GridFsStoreResource(String location, org.springframework.data.mongodb.gridfs.GridFsTemplate gridfs)
public long contentLength()
throws IOException
contentLength in interface org.springframework.core.io.ResourceIOExceptionpublic String getFilename() throws IllegalStateException
getFilename in interface org.springframework.core.io.ResourceIllegalStateExceptionpublic long lastModified()
throws IOException
lastModified in interface org.springframework.core.io.ResourceIOExceptionpublic Object getId()
public String getContentType()
public boolean exists()
exists in interface org.springframework.core.io.Resourcepublic boolean isOpen()
isOpen in interface org.springframework.core.io.Resourcepublic InputStream getInputStream() throws IOException, IllegalStateException
getInputStream in interface org.springframework.core.io.InputStreamSourceIOExceptionIllegalStateExceptionpublic String getDescription()
getDescription in interface org.springframework.core.io.Resourcepublic boolean isReadable()
isReadable in interface org.springframework.core.io.Resourcepublic URL getURL() throws IOException
getURL in interface org.springframework.core.io.ResourceIOExceptionpublic URI getURI() throws IOException
getURI in interface org.springframework.core.io.ResourceIOExceptionpublic File getFile() throws IOException
getFile in interface org.springframework.core.io.ResourceIOExceptionpublic org.springframework.core.io.Resource createRelative(String relativePath) throws IOException
createRelative in interface org.springframework.core.io.ResourceIOExceptionpublic boolean isWritable()
isWritable in interface org.springframework.core.io.WritableResourcepublic OutputStream getOutputStream() throws IOException
getOutputStream in interface org.springframework.core.io.WritableResourceIOExceptionpublic void delete()
delete in interface DeletableResourceCopyright © 2019 Paul Warren. All rights reserved.