Package org.apache.sis.storage
Class UnsupportedStorageException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.apache.sis.storage.DataStoreException
org.apache.sis.storage.IllegalOpenParameterException
org.apache.sis.storage.UnsupportedStorageException
- All Implemented Interfaces:
Serializable
,LocalizedException
Thrown when no
DataStoreProvider
is found for a given storage object.
May also be thrown if a DataStore
is instantiated directly but the data store
cannot handle the given input or output object.- Since:
- 0.4
- Version:
- 1.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final long
For cross-version compatibility. -
Constructor Summary
ConstructorsConstructorDescriptionCreates an exception with no cause and no details message.UnsupportedStorageException
(String message) Creates an exception with the specified details message.UnsupportedStorageException
(String message, Throwable cause) Creates an exception with the specified details message and cause.Creates an exception with the specified cause and no details message.UnsupportedStorageException
(Locale locale, short key, Object... parameters) Creates a new exception which will format a localized message in the given locale.UnsupportedStorageException
(Locale locale, String format, Object storage, OpenOption... options) Creates a localized exception for an invalid input or output object given to a data store. -
Method Summary
Methods inherited from class org.apache.sis.storage.DataStoreException
getInternationalMessage, getLocalizedMessage, getMessage, initCause
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor cross-version compatibility.- See Also:
-
-
Constructor Details
-
UnsupportedStorageException
public UnsupportedStorageException()Creates an exception with no cause and no details message. -
UnsupportedStorageException
Creates an exception with the specified details message.- Parameters:
message
- the detail message.
-
UnsupportedStorageException
Creates an exception with the specified cause and no details message.- Parameters:
cause
- the cause for this exception.
-
UnsupportedStorageException
Creates an exception with the specified details message and cause.- Parameters:
message
- the detail message.cause
- the cause for this exception.
-
UnsupportedStorageException
Creates a new exception which will format a localized message in the given locale.- Parameters:
locale
- the locale for the message to be returned byDataStoreException.getLocalizedMessage()
.key
- one ofResources.Keys
constants.parameters
- parameters to use for formatting the messages.
-
UnsupportedStorageException
public UnsupportedStorageException(Locale locale, String format, Object storage, OpenOption... options) Creates a localized exception for an invalid input or output object given to a data store. Arguments given to this constructor are hints for building an error message.- Parameters:
locale
- the locale of the message to be returned byDataStoreException.getLocalizedMessage()
, ornull
.format
- short name or abbreviation of the data format (e.g. "CSV", "GML", "WKT", etc).storage
- the invalid input or output object. This is typicallyStorageConnector.getStorage()
.options
- the option used for opening the file, ornull
or empty if unknown. This method looks in particular forStandardOpenOption.READ
andWRITE
options for inferring if the data store was to be used as a reader or as a writer. Those options can be obtained byStorageConnector.getOption(OptionKey.OPEN_OPTIONS)
.- Since:
- 0.8
-
-
Method Details
-
type
Returns the type of the given storage, with a special case for files or paths to directories. This is a work around for RFE #4093999 in Sun's bug database ("Relax constraint on placement of this()/super() call in constructors").
-