title: How to convert BufferedImage to InputStream?
body: <p>I am uploading images using servlet. To perform resize operations i am converting InputStream to BufferedImage. Now i want to save it in mongoDB. Since, i am new to mongoDB as far as i know, GridFS takes InputStream.</p>
  
  <p>So, is there any way to convert BufferedImage to InputStream? </p>