It is saving the finger print data as BLOB in the database. Blob (Binary Large Object) is nothing but a byte array representation of information, mainly used to store images etc in database. In your case, the fingerprint information is being stored.
enrollStmt.setBinaryStream(1,new ByteArrayInputStream(template.getData()), template.getData().length);
In this line, the bytearrayinputstream is created using the data in the template object. template.getData is giving you the byte[] representation of the fingerprint information. Then the byte[] is getting saved in database, by
enrollStmt.executeUpdate();
Whereas, the following query gives you the id for the data stored, for your use.
ResultSet rs = insertedIdStmt.executeQuery();