public class GridFSDBFile extends GridFSFile
InputStream
to stream the data intoModifier and Type | Class and Description |
---|---|
private class |
GridFSDBFile.GridFSInputStream |
chunkSize, contentType, extra, filename, fs, id, length, md5, uploadDate
Constructor and Description |
---|
GridFSDBFile() |
Modifier and Type | Method and Description |
---|---|
private byte[] |
getChunk(int chunkNumber) |
java.io.InputStream |
getInputStream()
Returns an InputStream from which data can be read.
|
(package private) void |
remove()
Removes file from GridFS i.e.
|
long |
writeTo(java.io.File file)
Writes the file's data to a file on disk.
|
long |
writeTo(java.io.OutputStream out)
Writes the file's data to an OutputStream.
|
long |
writeTo(java.lang.String filename)
Writes the file's data to a file on disk.
|
containsField, containsKey, get, getAliases, getChunkSize, getContentType, getFilename, getGridFS, getId, getLength, getMD5, getMetaData, getUploadDate, isPartialObject, keySet, markAsPartialObject, numChunks, put, putAll, putAll, removeField, save, setGridFS, setMetaData, toMap, toString, validate
public java.io.InputStream getInputStream()
public long writeTo(java.lang.String filename) throws java.io.IOException
filename
- the file name on diskjava.io.IOException
- if there are problems writing to the filepublic long writeTo(java.io.File file) throws java.io.IOException
file
- the File objectjava.io.IOException
- if there are problems writing to the file
public long writeTo(java.io.OutputStream out) throws java.io.IOException
out
- the OutputStreamjava.io.IOException
- if there are problems writing to out
private byte[] getChunk(int chunkNumber)
void remove()