public class GridFsUpload<ID> extends Object implements GridFsObject<ID,InputStream>
| Modifier and Type | Class and Description |
|---|---|
static class |
GridFsUpload.GridFsUploadBuilder<T>
Builder to create
GridFsUpload in a fluent way. |
GridFsObject.Options| Modifier and Type | Method and Description |
|---|---|
static GridFsUpload.GridFsUploadBuilder<org.bson.types.ObjectId> |
fromStream(InputStream stream)
Create a new instance of
GridFsUpload for the given InputStream. |
InputStream |
getContent()
The actual file content.
|
ID |
getFileId()
The
GridFSFile.getId() value converted into its simple java type. |
String |
getFilename()
The filename.
|
GridFsObject.Options |
getOptions()
Additional information like file metadata (eg. contentType).
|
@Nullable public ID getFileId()
GridFSFile.getId() value converted into its simple java type. BsonString will be converted to plain String.getFileId in interface GridFsObject<ID,InputStream>GridFsObject.getFileId()public String getFilename()
GridFsObjectgetFilename in interface GridFsObject<ID,InputStream>public InputStream getContent()
GridFsObjectgetContent in interface GridFsObject<ID,InputStream>public GridFsObject.Options getOptions()
GridFsObjectgetOptions in interface GridFsObject<ID,InputStream>public static GridFsUpload.GridFsUploadBuilder<org.bson.types.ObjectId> fromStream(InputStream stream)
GridFsUpload for the given InputStream.stream - must not be null.GridFsUpload.Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.