BicepBuddyApp/src/main/java/User/UserDB.java
public boolean notExists(String email) {
		try {
			reader = new BufferedReader(new FileReader(new File(filename)));
			String line;
			Master.appLogger.info(":: Opening CSV DB file to check that user doesn't exist already.");
			//read the emails from the UserDB CSV and return true if the
			//user is not found, else return false
			while ((line = reader.readLine()) != null) {
				String[] split = line.split(",");
				
				//check first field: email
				if(email.contentEquals(split[0])) {
					Master.appLogger.info(":: email " + email + " exists in the DB already.");
					reader.close();
					return false;
				}
			}
			
			reader.close();
			
		} catch (Exception e) {
			e.printStackTrace();
		}
		
		return true;
	}
/**
	 * Not exists.
	 *
	 * @param email email to verify with local CSV DB
	 * @return true, if email does not yet exist in the local CSV DB
	 */
Not exists.
@param email email to verify with local CSV DB
@return true, if email does not yet exist in the local CSV DB
Not exists . @param email email to verify with local CSV DB @return true if email does not yet exist in the local CSV DB
public boolean notExists(String email) {
		try {
			reader = new BufferedReader(new FileReader(new File(filename)));
			String line;
			Master.appLogger.info(":: Opening CSV DB file to check that user doesn't exist already.");
			while ((line = reader.readLine()) != null) {
				String[] split = line.split(",");
				if(email.contentEquals(split[0])) {
					Master.appLogger.info(":: email " + email + " exists in the DB already.");
					reader.close();
					return false;
				}
			}
			reader.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return true;
	}
public boolean notExists ( String email ) { try { reader = new BufferedReader ( new FileReader ( new File ( filename ) ) ) ; String line ; Master . appLogger . info ( ":: Opening CSV DB file to check that user doesn't exist already." ) ; while ( ( line = reader . readLine ( ) ) != null ) { String [ ] split = line . split ( "," ) ; if ( email . contentEquals ( split [ 0 ] ) ) { Master . appLogger . info ( ":: email " + email + " exists in the DB already." ) ; reader . close ( ) ; return false ; } } reader . close ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } return true ; }
Not exists.
Not exists .
//read the emails from the UserDB CSV and return true if the //user is not found, else return false //check first field: email