throw new IOException("null file");
throw new IllegalStateException("null file");
    public static byte[] bytesFromFile(File f) throws IOException {        if (f == null)            throw new IOException("null file");        int size = (int)f.length();        FileInputStream fis = new FileInputStream(f);        byte[] data = new byte[size];        int bytesRead = 0;        while (bytesRead < size)            bytesRead += fis.read(data, bytesRead, size - bytesRead);        fis.close();        return data;    }