net.sf.uadetector.internal.util
Class FileUtil

java.lang.Object
  extended by net.sf.uadetector.internal.util.FileUtil

public final class FileUtil
extends java.lang.Object

This class is intended to provide file utility functions.

Author:
André Rouél

Method Summary
static boolean isEmpty(java.io.File file, java.nio.charset.Charset charset)
          Checks if the given file is empty.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isEmpty

public static boolean isEmpty(java.io.File file,
                              java.nio.charset.Charset charset)
                       throws java.io.IOException
Checks if the given file is empty.

Parameters:
file - the file that could be empty
Returns:
true when the file is accessible and empty otherwise false
Throws:
java.io.IOException - if an I/O error occurs


Copyright © 2011-2014. All Rights Reserved.