/** * Returns the set of data store providers available at this method invocation time. * More providers may be added later in a running JVM if new modules are added on the classpath. * * @return descriptions of available data stores. * * @since 0.8 */ public static Collection<DataStoreProvider> providers() { return registry().providers(); }
/** * Returns the MIME type of the storage file format, or {@code null} if unknown or not applicable. * * @param storage the input/output object as a URL, file, image input stream, <i>etc.</i>. * @return the storage MIME type, or {@code null} if unknown or not applicable. * @throws DataStoreException if an error occurred while opening the storage. */ public static String probeContentType(final Object storage) throws DataStoreException { return registry().probeContentType(storage); }
/** * Returns the list of data store providers available at this method invocation time. * More providers may be added later in a running JVM if new modules are added on the classpath. * * @return descriptions of available data stores. * * @since 0.8 */ public static Collection<DataStoreProvider> providers() { return registry().providers(); }
/** * Returns the MIME type of the storage file format, or {@code null} if unknown or not applicable. * * @param storage the input/output object as a URL, file, image input stream, <i>etc.</i>. * @return the storage MIME type, or {@code null} if unknown or not applicable. * @throws DataStoreException if an error occurred while opening the storage. */ public static String probeContentType(final Object storage) throws DataStoreException { return registry().probeContentType(storage); }
/** * Creates a {@link DataStore} for the given storage. * The {@code storage} argument can be any of the following types: * * <ul> * <li>A {@link java.nio.file.Path} or a {@link java.io.File} for a file or a directory.</li> * <li>A {@link java.net.URI} or a {@link java.net.URL} to a distant resource.</li> * <li>A {@link java.lang.CharSequence} interpreted as a filename or a URL.</li> * <li>A {@link java.nio.channels.Channel}, {@link java.io.DataInput}, {@link java.io.InputStream} or {@link java.io.Reader}.</li> * <li>A {@link javax.sql.DataSource} or a {@link java.sql.Connection} to a JDBC database.</li> * <li>Any other {@code DataStore}-specific object, for example {@link ucar.nc2.NetcdfFile}.</li> * <li>An existing {@link StorageConnector} instance.</li> * </ul> * * @param storage the input/output object as a URL, file, image input stream, <i>etc.</i>. * @return the object to use for reading geospatial data from the given storage. * @throws UnsupportedStorageException if no {@link DataStoreProvider} is found for a given storage object. * @throws DataStoreException if an error occurred while opening the storage. */ public static DataStore open(final Object storage) throws UnsupportedStorageException, DataStoreException { return registry().open(storage); } }
/** * Creates a {@link DataStore} for the given storage. * The {@code storage} argument can be any of the following types: * * <ul> * <li>A {@link java.nio.file.Path} or a {@link java.io.File} for a file or a directory.</li> * <li>A {@link java.net.URI} or a {@link java.net.URL} to a distant resource.</li> * <li>A {@link java.lang.CharSequence} interpreted as a filename or a URL.</li> * <li>A {@link java.nio.channels.Channel}, {@link java.io.DataInput}, {@link java.io.InputStream} or {@link java.io.Reader}.</li> * <li>A {@link javax.sql.DataSource} or a {@link java.sql.Connection} to a JDBC database.</li> * <li>Any other {@code DataStore}-specific object, for example {@link ucar.nc2.NetcdfFile}.</li> * <li>An existing {@link StorageConnector} instance.</li> * </ul> * * @param storage the input/output object as a URL, file, image input stream, <i>etc.</i>. * @return the object to use for reading geospatial data from the given storage. * @throws UnsupportedStorageException if no {@link DataStoreProvider} is found for a given storage object. * @throws DataStoreException if an error occurred while opening the storage. */ public static DataStore open(final Object storage) throws UnsupportedStorageException, DataStoreException { return registry().open(storage); } }