ArrayList lines = new ArrayList(); BufferedReader in = new BufferedReader(new FileReader(file)); String line; while ((line = in.readLine()) != null) { lines.add( line ); } in.close(); return (String[]) lines.toArray( new String[ lines.size() ]);
return readTextFile( new File( fileName) );
	public static String[] readTextFile( File file ) 	throws FileNotFoundException, IOException 	{		ArrayList lines = new ArrayList();		BufferedReader in = new BufferedReader(new FileReader(file));		String line;		while ((line = in.readLine()) != null) {			lines.add( line );		}		in.close();		return (String[]) lines.toArray( new String[ lines.size() ]);	}