Class GridFsObject.Options
java.lang.Object
org.springframework.data.mongodb.gridfs.GridFsObject.Options
- Enclosing interface:
- GridFsObject<ID,CONTENT> 
Additional, context relevant information.
- Author:
- Christoph Strobl
- 
Method SummaryModifier and TypeMethodDescriptionchunkSize(int chunkSize) contentType(String contentType) Set the associated content type.static GridFsObject.Optionsfrom(com.mongodb.client.gridfs.model.GridFSFile gridFSFile) Static factory method to createGridFsObject.Optionsby extracting information from the givenGridFSFile.intorg.bson.Documentmetadata(org.bson.Document metadata) static GridFsObject.Optionsnone()Static factory to create empty options.static GridFsObject.OptionsStatic factory method to createGridFsObject.Optionswith given content type.
- 
Method Details- 
noneStatic factory to create empty options.- Returns:
- new instance of GridFsObject.Options.
 
- 
typedStatic factory method to createGridFsObject.Optionswith given content type.- Parameters:
- contentType-
- Returns:
- new instance of GridFsObject.Options.
 
- 
frompublic static GridFsObject.Options from(@Nullable com.mongodb.client.gridfs.model.GridFSFile gridFSFile) Static factory method to createGridFsObject.Optionsby extracting information from the givenGridFSFile.- Parameters:
- gridFSFile- can be null, returns- none()in that case.
- Returns:
- new instance of GridFsObject.Options.
 
- 
contentTypeSet the associated content type.- Parameters:
- contentType- must not be null.
- Returns:
- new instance of GridFsObject.Options.
 
- 
metadata- Parameters:
- metadata-
- Returns:
- new instance of GridFsObject.Options.
 
- 
chunkSize- Parameters:
- chunkSize- the file chunk size to use.
- Returns:
- new instance of GridFsObject.Options.
 
- 
getMetadatapublic org.bson.Document getMetadata()- Returns:
- never null.
 
- 
getChunkSizepublic int getChunkSize()- Returns:
- the chunk size to use.
 
 
-