/** * Reads a sequence of geometries. * If an offset is specified, geometries read up to the offset count are skipped. * If a limit is specified, no more than <tt>limit</tt> geometries are read. * * @return the list of geometries read * @throws IOException if an I/O exception was encountered * @throws ParseException if an error occured reading a geometry */ public List read() throws IOException, ParseException { // do this here so that constructors don't throw exceptions if (file != null) reader = new FileReader(file); count = 0; try { BufferedReader bufferedReader = new BufferedReader(reader); try { return read(bufferedReader); } finally { bufferedReader.close(); } } finally { reader.close(); } }
/** * Reads a sequence of geometries. * If an offset is specified, geometries read up to the offset count are skipped. * If a limit is specified, no more than <tt>limit</tt> geometries are read. * * @return the list of geometries read * @throws IOException if an I/O exception was encountered * @throws ParseException if an error occured reading a geometry */ public List read() throws IOException, ParseException { // do this here so that constructors don't throw exceptions if (file != null) reader = new FileReader(file); count = 0; try { BufferedReader bufferedReader = new BufferedReader(reader); try { return read(bufferedReader); } finally { bufferedReader.close(); } } finally { reader.close(); } }