public boolean write(String username, String action, String filename,
String pathname) {
String sql = "INSERT INTO log (username, optime, action, filename, pathname) VALUES(?, ?, ?, ?, ?)";
DBUtil util = new DBUtil();
Connection conn = util.openConnection();
try {
PreparedStatement pstmt = conn.prepareStatement(sql);
pstmt.setString(1, username);
String optime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
.format(new Date());