public class GridFsResource
extends org.springframework.core.io.InputStreamResource
GridFSDBFile based Resource implementation.| Constructor and Description |
|---|
GridFsResource(com.mongodb.gridfs.GridFSDBFile file)
Creates a new
GridFsResource from the given GridFSDBFile. |
| Modifier and Type | Method and Description |
|---|---|
long |
contentLength() |
String |
getContentType()
Returns the
Resource's content type. |
String |
getFilename() |
Object |
getId()
Returns the
Resource's id. |
long |
lastModified() |
equals, exists, getDescription, getInputStream, hashCode, isOpenpublic GridFsResource(com.mongodb.gridfs.GridFSDBFile file)
GridFsResource from the given GridFSDBFile.file - must not be null.public long contentLength()
throws IOException
contentLength in interface org.springframework.core.io.ResourcecontentLength in class org.springframework.core.io.AbstractResourceIOExceptionpublic String getFilename() throws IllegalStateException
getFilename in interface org.springframework.core.io.ResourcegetFilename in class org.springframework.core.io.AbstractResourceIllegalStateExceptionpublic long lastModified()
throws IOException
lastModified in interface org.springframework.core.io.ResourcelastModified in class org.springframework.core.io.AbstractResourceIOExceptionpublic Object getId()
Resource's id.public String getContentType()
Resource's content type.Copyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.