title: Save a fingerprint template into a database mysql - java
body: <p>I am developing a project with the sdk fingerprint of Griaule , and as a start I'm creating a program without a GUI that allows the user to scan his fingerprint and store it in a mysql database already created earlier.
  I'm here to ask you a hand with regard to storing the fingerprint in the database.
  In the program I created, I captured the fingerprint, I extracted the template from the fingerprint through a function I call extract () .
  After that I should call another function , enroll (), which allows me to save the fingerprint in a database.
  Even looking at the SDK examples I did not understand how it works, can someone help me? thanks in advance! :)</p>
  
  <pre><code>public void enroll() {
     try {
         //Inserts the template on the database
         enrollStmt.setBinaryStream(1,new ByteArrayInputStream(template.getData()), template.getData().length);
         enrollStmt.executeUpdate();
  
         //Picks the ID generated for it. 
         ResultSet rs = insertedIdStmt.executeQuery();
         rs.next();
         ui.writeLog("Fingerprint enrolled with id = "+Integer.toString(rs.getInt(1)));
  
     } catch (SQLException e) {
         ui.writeLog("Error enrolling template");
     }
  }
  </code></pre>