Class DataLengthViolationException

All Implemented Interfaces:
Serializable

public final class DataLengthViolationException extends ConstraintViolationException
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 Details

    • getFeature

      public DataField getFeature()
      Returns the field, that was attempted to be written.
      Specified by:
      getFeature in class ConstraintViolationException
    • 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 by getLength() is the exact length of the data attempted to be written (true) or just a lower bound of that length (false).
    • getMessage

      public String getMessage(boolean withFeature)
      Specified by:
      getMessage in class ConstraintViolationException
    • getDataAttribute

      @Deprecated public DataField getDataAttribute()
      Deprecated.
      Renamed to getFeature().