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
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:
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 ucar.nc2.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–2015 The Apache Software Foundation. All rights reserved.