GeoTiffReader should provide better error message for permissions issues

Description

If you are using the GeoTiffReader to read a file that you do not have read permissions on, the exception that gets thrown is misleading and not very helpful. For example:

GeoTiffReader gcr = (GeoTiffReader) File(filePath));

If filePath is a file you do not have read permissions on, you will get the following exception:

java.lang.IllegalArgumentException: No input stream for the provided source
at org.geotools.gce.geotiff.GeoTiffReader.<init>(GeoTiffReader.java:202)
at org.geotools.gce.geotiff.GeoTiffFormat.getReader(GeoTiffFormat.java:283)
at org.geotools.gce.geotiff.GeoTiffFormat.getReader(GeoTiffFormat.java:249)

Ideally the exception would be an IOException and would mention that the read permission is denied.

Environment

None

Status

Assignee

Unassigned

Reporter

codehaus

Triage

None

Components

Fix versions

Affects versions

Priority

Low
Configure