How to compare the extension of a file with different extensions in java
<p>i want to compare the retrieved file extension with different valid extionsions according to my requirement in java  like,</p>

<pre><code> CSVReader reader1 = new CSVReader(reader), ';', '\'', 1);
    try{
        while ((lNextLine = reader.readNext()) != null) {
            for(int i = 0;i &lt; lNextLine.length; i++){
                String lFilename = lNextLine[0];
                String[] lext = lFilename.split("\\.");
                if(lext[1].equals("jpeg")||lext[1].equals("wmv")||lext[1].equals("doc")....){
                    return true;
                }
                else{
                    return false;
                }
            }
        }
    }
</code></pre>

<p>Thanks,</p>

<p>Raj</p>
