Package org.apache.sis.storage
Class ForwardOnlyStorageException
- Object
-
- Throwable
-
- Exception
-
- DataStoreException
-
- ForwardOnlyStorageException
-
- All Implemented Interfaces:
Serializable
,LocalizedException
public class ForwardOnlyStorageException extends DataStoreException
Thrown when an operation would require to move the cursor back, but the underlying storage does not allow that. For example this exception is thrown if the user wants to read the same data a second time, but the underlying ReadableByteChannel is not seekable.This exception typically does not depend on the
DataStore
implementation, but rather on theStorageConnector
value given to the data store.- Since:
- 0.8
- See Also:
ReadOnlyStorageException
, Serialized Form
Defined in the
sis-storage
module
-
-
Constructor Summary
Constructors Constructor Description ForwardOnlyStorageException()
Creates an exception with no cause and no details message.ForwardOnlyStorageException(String message)
Creates an exception with the specified details message.ForwardOnlyStorageException(String message, Throwable cause)
Creates an exception with the specified details message and cause.ForwardOnlyStorageException(Locale locale, String filename, OpenOption... options)
Creates a localized exception with a default message saying that the stream is read-once or write-once.
-
Method Summary
-
Methods inherited from class DataStoreException
getInternationalMessage, getLocalizedMessage, getMessage, initCause
-
Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
ForwardOnlyStorageException
public ForwardOnlyStorageException()
Creates an exception with no cause and no details message.
-
ForwardOnlyStorageException
public ForwardOnlyStorageException(String message)
Creates an exception with the specified details message.- Parameters:
message
- the detail message.
-
ForwardOnlyStorageException
public ForwardOnlyStorageException(String message, Throwable cause)
Creates an exception with the specified details message and cause.- Parameters:
message
- the detail message in the default locale.cause
- the cause for this exception.
-
ForwardOnlyStorageException
public ForwardOnlyStorageException(Locale locale, String filename, OpenOption... options)
Creates a localized exception with a default message saying that the stream is read-once or write-once.- Parameters:
locale
- the locale of the message to be returned byDataStoreException.getLocalizedMessage()
, ornull
.filename
- name of the file or data store where the error occurred.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 used as a reader or as a writer.
-
-