Count the Spaces in file

//Count the Spaces in file
import java.io.*;
class Space
{
public static void main(String args[])throws IOException
{
int c,lcnt=1;
try
{
FileReader fr=new FileReader("Space.java");
while((c=fr.read())!=-1)
{
System.out.print((char)c);
if((char)c==' ')
{
lcnt ++;
}
}fr.close();
System.out.println("no of  Space in file"+lcnt);
}catch(Exception e)
{
System.out.println(e);
}
}
}