Class Utf8View.ValidationResult

java.lang.Object
express.mvp.roray.utils.memory.Utf8View.ValidationResult
Enclosing class:
Utf8View

public static final class Utf8View.ValidationResult extends Object
Result of UTF-8 validation, containing error type and position if invalid.
  • Field Details

    • VALID

      public static final Utf8View.ValidationResult VALID
      Singleton for valid UTF-8 data (zero allocation for the common case).
  • Method Details

    • isValid

      public boolean isValid()
      Returns true if the UTF-8 data is valid.
    • error

      public Utf8View.ValidationError error()
      Returns the error type, or null if valid.
    • errorOffset

      public long errorOffset()
      Returns the byte offset of the error within the view, or -1 if valid.
    • toString

      public String toString()
      Overrides:
      toString in class Object