com.mongodb.gridfs
Class GridFSDBFile
java.lang.Object
com.mongodb.gridfs.GridFSFile
com.mongodb.gridfs.GridFSDBFile
- All Implemented Interfaces:
- DBObject, BSONObject
public class GridFSDBFile
- extends GridFSFile
This class enables to retrieve a GridFS file metadata and content.
Operations include:
- writing data to a file on disk or an OutputStream
- getting each chunk as a byte array
- getting an InputStream to stream the data in
- Author:
- antoine
Methods inherited from class com.mongodb.gridfs.GridFSFile |
containsField, containsKey, get, getAliases, getChunkSize, getContentType, getFilename, getId, getLength, getMD5, getMetaData, getUploadDate, isPartialObject, keySet, markAsPartialObject, numChunks, put, putAll, putAll, removeField, save, setGridFS, toMap, toString, validate |
GridFSDBFile
public GridFSDBFile()
getInputStream
public InputStream getInputStream()
writeTo
public long writeTo(String filename)
throws IOException
- Throws:
IOException
writeTo
public long writeTo(File f)
throws IOException
- Throws:
IOException
writeTo
public long writeTo(OutputStream out)
throws IOException
- Throws:
IOException