title: Java BLOB to image file
body: <p>I have a <code>BLOB</code> that is retrieved from a MySQL database as follows:</p>
  
  <pre><code>Blob imageBlob;
  while (rs.next()) {
      imageBlob= rs.getBlob("face");
  }
  </code></pre>
  
  <p>after that my <code>imageBlob</code> is something like this: <code>data:image/png;base64,iVBORw0KGgoAAAANSUhE................</code></p>
  
  <p>I've been googling around but I haven't found any solution to my problem: how do I create an image file and save it on the disk from this BLOB?</p>