I am using Java-driver 2.13
. GridFS takes input as File
, InputStream
or byte[]
in createFile()
method on GridFS
instance to create GridFSInputFile
.
But when I tried to fetch data back I do have option only as File
or outputStream
using GridFSDBFile.writeTo()
method.
I want to get data as byte[]
. Is there any direct way in GridFS API or I need to manually convert it?