Class GridFSUploadOptions
- java.lang.Object
-
- io.vertx.mongo.client.gridfs.model.GridFSUploadOptions
-
public class GridFSUploadOptions extends java.lang.Object
GridFS upload options Customizable options used when uploading files into GridFS- Since:
- 3.1
-
-
Constructor Summary
Constructors Constructor Description GridFSUploadOptions()
GridFSUploadOptions(JsonObject json)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Integer
getChunkSizeBytes()
The number of bytes per chunk of this file.JsonObject
getMetadata()
Returns any user provided data for the 'metadata' field of the files collection document.GridFSUploadOptions
setChunkSizeBytes(java.lang.Integer chunkSizeBytes)
Sets the chunk size in bytes.GridFSUploadOptions
setMetadata(JsonObject metadata)
Sets metadata to stored alongside the filename in the files collectionJsonObject
toJson()
-
-
-
Constructor Detail
-
GridFSUploadOptions
public GridFSUploadOptions()
-
GridFSUploadOptions
public GridFSUploadOptions(JsonObject json)
-
-
Method Detail
-
toJson
public JsonObject toJson()
-
setChunkSizeBytes
public GridFSUploadOptions setChunkSizeBytes(java.lang.Integer chunkSizeBytes)
Sets the chunk size in bytes.- Parameters:
chunkSizeBytes
- the number of bytes per chunk for the uploaded file- Returns:
- this
-
getChunkSizeBytes
public java.lang.Integer getChunkSizeBytes()
The number of bytes per chunk of this file.If no value has been set then, the chunkSizeBytes from the GridFSBucket will be used.
- Returns:
- number of bytes per chunk if set or null
-
setMetadata
public GridFSUploadOptions setMetadata(JsonObject metadata)
Sets metadata to stored alongside the filename in the files collection- Parameters:
metadata
- the metadata to be stored- Returns:
- this
-
getMetadata
public JsonObject getMetadata()
Returns any user provided data for the 'metadata' field of the files collection document.- Returns:
- the user provided metadata for the file if set or null
-
-