title: How to get file type extension from byte[] (Blob)
body: <p>How to get file type extension from <code>byte[]</code> (Blob). I'm reading files from DB to <code>byte[]</code> but i don't know how to automatically detect file extension.</p>
  
  <pre><code>Blob blob = rs.getBlob(1);
  byte[] bdata = blob.getBytes(1, (int) blob.length());
  </code></pre>