public static boolean isEmpty(final File file,final Charset charset) throws IOException {
  boolean empty=false;
  BufferedReader reader=null;
  boolean threw=true;
  try {
    reader=new BufferedReader(new InputStreamReader(new FileInputStream(file),charset));
    final String line=reader.readLine();
    empty=line == null;
    threw=false;
  }
  finally {
    Closeables.close(reader,threw);
  }
  return empty;
}

public static boolean isEmpty ( final File file , final Charset charset ) throws IOException { boolean empty = false ; BufferedReader reader = null ; boolean threw = true ; try { reader = new BufferedReader ( new InputStreamReader ( new FileInputStream ( file ) , charset ) ) ; final String line = reader . readLine ( ) ; empty = line == null ; threw = false ; } finally { Closeables . close ( reader , threw ) ; } return empty ; }
checks if the given file is empty .
