Write stream into mongoDB in Java
问题 I have a file to store in mongoDB. What I want is to avoid loading the whole file (which could be several MBs in size) instead I want to open the stream and direct it to mongoDB to keep the write operation performant. I dont mind storing the content in base64 encoded byte[]. Afterwards I want to do the same at the time of reading the file i.e. not to load the whole file in memory, instead read it in a stream. I am currently using hibernate-ogm with Vertx server but I am open to switch to a