/** * Read the grid info file which is basically a world file with supplement information. * * @param infoFile * to read. * @param options * containing information about the crs, origin location etc. * @return an new {@link GridMetaInfoFile} read from the given file. * @throws NumberFormatException * @throws IOException */ public static GridMetaInfoFile readFromFile( File infoFile, RasterIOOptions options ) throws NumberFormatException, IOException { BufferedReader br = new BufferedReader( new FileReader( infoFile ) ); GridMetaInfoFile gmi = read( br, options ); br.close(); return gmi; }
try { reader = new BufferedReader( new FileReader( metaInfo ) ); GridMetaInfoFile gmif = GridMetaInfoFile.read( reader, null ); if ( gmif == null ) { throw new NullPointerException( "no info file could be read" );