public static Icon from(File file) throws IOException
    {
        Checks.notNull(file, "Provided File");
        Checks.check(file.exists(), "Provided file does not exist!");

        return from(IOUtil.readFully(file));
    }
public static Icon from ( File file ) throws IOException { Checks . notNull ( file , "Provided File" ) ; Checks . check ( file . exists ( ) , "Provided file does not exist!" ) ; return from ( IOUtil . readFully ( file ) ) ; }
Creates an {@link Icon Icon} with the specified {@link java.io.File File}.
<br>We here read the specified File and forward the retrieved byte data to {@link #from(byte[])}.

@param  file
An existing, not-null file.

@throws IllegalArgumentException
if the provided file is either null or does not exist
@throws IOException
if there is a problem while reading the file.

@return An Icon instance representing the specified File

@see    net.dv8tion.jda.core.utils.IOUtil#readFully(File)