public static String[] getFilePaths(String path, String f)
    {
	if(!isDirEmpty(path))
	{
	    File dir = new File(path);
	    File[] files = dir.listFiles();

	    // This filter only returns the files present
	    FileFilter fileFilter = new FileFilter() {
		public boolean accept(File file) {
		    return file.isFile();
		}
	    };

	    files = dir.listFiles(fileFilter);
	    Arrays.sort(files);
	    
	    Vector<String> paths = new Vector<String>();
	    
	    for(int i = 0; i < files.length;i++)
	    {
		try 
		{
		    String cpath = files[i].getCanonicalPath();
		    
		    if(cpath.endsWith(f))
			paths.add(cpath);
		}
		catch(IOException e){}
	    }
	    
	    String[] values = paths.toArray(new String[paths.size()]);
	    
	    return values;
	}
	else
	    return null; // Directory is empty.
    }