Package com.exedio.cope
Class DataLengthViolationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.exedio.cope.ConstraintViolationException
com.exedio.cope.DataLengthViolationException
- All Implemented Interfaces:
Serializable
Signals, that an attempt to write a
data field has been failed,
because value to be written violated the length constraint on that field.
This exception will be thrown by DataField.set(Item,byte[]) etc.
and item constructors.- Author:
- Ralf Wiebicke
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Returns the field, that was attempted to be written.longReturns the length of the data, that was attempted to be written.getMessage(boolean withFeature) booleanReturns, whether the value returned bygetLength()is the exact length of the data attempted to be written (true) or just a lower bound of that length (false).Methods inherited from class com.exedio.cope.ConstraintViolationException
getItem, getItemID, getItemPhrase, getItemText, getMessage, getMessageWithoutFeatureMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Method Details
-
getFeature
Returns the field, that was attempted to be written.- Specified by:
getFeaturein classConstraintViolationException
-
getLength
public long getLength()Returns the length of the data, that was attempted to be written. Returns -1, if that length is unknown.- See Also:
-
isLengthExact
public boolean isLengthExact()Returns, whether the value returned bygetLength()is the exact length of the data attempted to be written (true) or just a lower bound of that length (false). -
getMessage
- Specified by:
getMessagein classConstraintViolationException
-
getDataAttribute
Deprecated.Renamed togetFeature().
-
getFeature().