public final class DataStores extends Static
DataStore instances from a given storage object.
Storage objects are typically File or DataSource instances,
but can also be any other objects documented in the StorageConnector class.Defined in the sis-storage module
| Modifier and Type | Method and Description |
|---|---|
static DataStore |
open(Object storage)
Creates a
DataStore for the given storage. |
static String |
probeContentType(Object storage)
Returns the MIME type of the storage file format, or
null if unknown or not applicable. |
static Collection<DataStoreProvider> |
providers()
Returns the list of data store providers available at this method invocation time.
|
public static Collection<DataStoreProvider> providers()
public static String probeContentType(Object storage) throws DataStoreException
null if unknown or not applicable.storage - the input/output object as a URL, file, image input stream, etc..null if unknown or not applicable.DataStoreException - if an error occurred while opening the storage.public static DataStore open(Object storage) throws UnsupportedStorageException, DataStoreException
DataStore for the given storage.
The storage argument can be any of the following types:
Path or a File for a file or a directory.URI or a URL to a distant resource.CharSequence interpreted as a filename or a URL.Channel, DataInput, InputStream or Reader.DataSource or a Connection to a JDBC database.DataStore-specific object, for example NetcdfFile.StorageConnector instance.storage - the input/output object as a URL, file, image input stream, etc..UnsupportedStorageException - if no DataStoreProvider is found for a given storage object.DataStoreException - if an error occurred while opening the storage.Copyright © 2010–2017 The Apache Software Foundation. All rights reserved.