Package org.geotools.coverage.grid.io

Examples of org.geotools.coverage.grid.io.GridCoverage2DReader.dispose()


                        final boolean removed = FileUtils.deleteQuietly(DataUtilities.urlToFile(rasterPath));
                    }
                } finally {
                    if (coverageReader != null) {
                        try {
                            coverageReader.dispose();
                        } catch (Throwable t) {
                            //Ignoring exceptions on disposing readers
                        }
                    }
                }
View Full Code Here


            // release resources
            //
            try {
                if (coverageReader != null)
                    // release resources
                    coverageReader.dispose();
            } catch (Throwable e) {
                // ignore exception
                if (LOGGER.isLoggable(Level.FINEST))
                    LOGGER.log(Level.FINEST, e.getLocalizedMessage(), e);
            }
View Full Code Here

      return;
    }

    envelope = inReader.getOriginalEnvelope();
    try {
        inReader.dispose();
    } catch(IOException e) {
        LOGGER.log(Level.SEVERE, "Failure occurred while closing grid coverage reader", e);
    }

    // /////////////////////////////////////////////////////////////////////
View Full Code Here

            coverages.iterator()) {

          @Override
          public void close()
              throws IOException {
            reader.dispose();
          }
        };
      }
      else {
        LOGGER.warn("Null grid coverage from file '" + input.getAbsolutePath() + "' for discovered geotools format '" + format.getName() + "'");
View Full Code Here

            } else {
                addCoverage(store, builder, reader, catalog, format, name, qName, props, null);
            }
        } finally {
            if(reader != null) {
                reader.dispose();
            }
        }
    }

    private void addCoverage(CoverageStoreInfo store, CatalogBuilder builder, GridCoverage2DReader reader, Catalog catalog,
View Full Code Here

            } else {
                catalog.save(layer);
            }
        } finally {
            if (reader != null) {
                reader.dispose();
            }
        }
    }
}
View Full Code Here

            reader2.delete(true);
        } finally {
            // Reader disposal
            if (reader != null) {
                try {
                    reader.dispose();
                } catch (Throwable t) {
                    // Does nothing
                }
            }
            if (reader2 != null) {
View Full Code Here

            }
            throw new RestletException( "Error auto-configuring coverage", Status.SERVER_ERROR_INTERNAL, e );
        } finally {
            if(reader != null) {
                try {
                    reader.dispose();
                } catch(IOException e)  {
                    // it's ok, we tried
                }           
            }
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.