Add Utiltities method to DataUtilities class --------------------------------------------
Key: GEOT-3041 URL: http://jira.codehaus.org/browse/GEOT-3041 Project: GeoTools Issue Type: Wish Components: core main Affects Versions: 2.6.3 Reporter: Daniele Romagnoli Assignee: Jody Garnett Fix For: 2.6.4 Attachments: gt-main.patch Some modules involving data I/O usually perform several required checks before performing input/output operations. As an instance, they check if a specified file exists/can be read, if a specified path refers to an existing/readable directory, if a specified file is of a specific supported type. For this reason it will be useful to add some utilities method to the DataUtilities class: public static boolean checkFileReadable(final File file, final Logger logger): Checks that a File is a real file, exists and is readable. An optional logger (which can be null) can be specified to get fine logging details. public static String checkDirectory(String directoryPath) Checks that the provided directory path refers to an existing/readable directory. public static IOFileFilter excludeFilters(final IOFileFilter inputFilter, IOFileFilter... filters) Returns a IOFileFilter obtained by excluding from the first input filter argument, the additional filter rguments. public static IOFileFilter includeFilters(final IOFileFilter inputFilter, IOFileFilter... filters) Returns a IOFileFilter obtained by adding to the first input filter argument, the additional filter arguments. Note that some of these new methods leverage on commons-io and then that dependency should be added to the pom. The attached patch will allow to add the methods and dependency. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel