你好我们正在使用digitalPersona UareU sdk java.i想要导入存储在我的数据库中的Fmds用于识别但是我得到一个arrayIndexOutOfBounds异常22,任何贡献将被赞赏的fingerPrint考勤软件。下面是我获取fmds的数据库代码。
public class Record {
String userID;
byte[] fmdBinary;
Record(String ID, byte[] fmd) {
userID = ID;
fmdBinary = fmd;
}
}
public List<Record> GetAllFPData() throws SQLException {
List<Record> listUsers = new ArrayList<Record>();
String sqlStmt = "Select * from " + tableName;
Statement st = connection.createStatement();
ResultSet rs = st.executeQuery(sqlStmt);
while (rs.next()) {
if (rs.getBytes(print1Column) != null)
listUsers.add(new Record(rs.getString(userColumn), rs
.getBytes(print1Column)));
}
return listUsers;
}
///////////////
try {
db.Open();
this.m_listOfRecords = db.GetAllFPData();
for (FingerDB.Record record : this.m_listOfRecords) {
//And this is the block that gives the error
Fmd fmd = UareUGlobal.GetImporter().ImportFmd(record.fmdBinary,
Fmd.Format.ANSI_378_2004,Fmd.Format.ANSI_378_2004);
///////////
this.m_fmdList.add(fmd);
}
m_fmdArray = new Fmd[this.m_fmdList.size()];
this.m_fmdList.toArray(m_fmdArray);
} catch (SQLException e1) {
// TODO Auto-generated catch block
MessageBox
.DpError("Failed to load FMDs from database.Please check
connection string in code.",
null);
return;
} catch (UareUException e1) {
// TODO Auto-generated catch block
JOptionPane
.showMessageDialog(null, "Error importing fmd data.");
return;
}