Information for creating a connection to a {@link DataStore} in read and/or write mode.{@code StorageConnector} wraps an input {@link Object}, which can be any of the following types:
- A {@link java.nio.file.Path} or a {@link java.io.File} or file or a directory in a file system.
- A {@link java.net.URI} or a {@link java.net.URL} to a distant resource.
- A {@link CharSequence} interpreted as a filename or a URL.
- A {@link java.nio.channels.Channel} or a {@link DataInput}.
- A {@link DataSource} or a {@link Connection} to a JDBC database.
- Any other {@code DataStore}-specific object, for example {@link ucar.nc2.NetcdfFile}.
The {@link #getStorageAs(Class)} method provides the storage as an object of the given type, openingthe input stream if necessary. This class tries to open the stream only once - subsequent invocation of {@code getStorageAs(…)} may return the same input stream.
This class is used only for discovery of a {@code DataStore} implementation capable to handle the input.Once a suitable {@code DataStore} has been found, the {@code StorageConnector} instance is typicallydiscarded since each data store implementation will use their own input/output objects.
Instances of this class are serializable if the {@code storage} object given at construction timeis serializable.
@author Martin Desruisseaux (Geomatys)
@since 0.3
@version 0.3
@module