public static void checkGetInputStreamOK(Resource resource) throws IOException {
	if (!resource.exists()) throw new IOException("file [" + resource.getPath() + "] does not exist");

	if (resource.isDirectory()) throw new IOException("can't read directory [" + resource.getPath() + "] as a file");

    }
public static void checkGetInputStreamOK ( Resource resource ) throws IOException { if ( ! resource . exists ( ) ) throw new IOException ( "file [" + resource . getPath ( ) + "] does not exist" ) ; if ( resource . isDirectory ( ) ) throw new IOException ( "can't read directory [" + resource . getPath ( ) + "] as a file" ) ; }
check if getting a inputstream of the file is ok with the rules for the Resource interface, to
not change this rules.

@param resource
@throws IOException