public void findSize() throws FileNotFoundException {
		if (csvFile != null) {
			Scanner file = new Scanner(csvFile);
			String line = file.nextLine();
			file.close();
			StringTokenizer tokenizer = new StringTokenizer(line, ",");
			LineNumberReader lnr = new LineNumberReader(new FileReader(csvFile));
			try {
				lnr.skip(Long.MAX_VALUE);
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			int x = lnr.getLineNumber();
			try {
				lnr.close();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			if (orientation==Orientation.STD) {
				fields = tokenizer.countTokens();
				elements = x + 1;
			} else {
				elements = tokenizer.countTokens();
				fields = x;
			}
		} else
			System.out.println("csvFile not specified");
	}
public void findSize ( ) throws FileNotFoundException { if ( csvFile != null ) { Scanner file = new Scanner ( csvFile ) ; String line = file . nextLine ( ) ; file . close ( ) ; StringTokenizer tokenizer = new StringTokenizer ( line , "," ) ; LineNumberReader lnr = new LineNumberReader ( new FileReader ( csvFile ) ) ; try { lnr . skip ( Long . MAX_VALUE ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } int x = lnr . getLineNumber ( ) ; try { lnr . close ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } if ( orientation == Orientation . STD ) { fields = tokenizer . countTokens ( ) ; elements = x + 1 ; } else { elements = tokenizer . countTokens ( ) ; fields = x ; } } else System . out . println ( "csvFile not specified" ) ; }
@throws FileNotFoundException
@throws IOException