-
StructuralEncodingRules.checkUtf8(byte[] bytes)
Validates the UTF-8 byte grammar of the sample and returns one of three
outcomes:
LIKELY_UTF8: all multi-byte sequences are
valid
and the sample contains enough high bytes to be
informative.
StructuralEncodingRules.checkUtf8(byte[] bytes,
int offset,
int length)
StructuralEncodingRules.Utf8Stats.toResult()
Collapse to the
StructuralEncodingRules.checkUtf8(byte[]) tri-state: any invalidity →
NOT_UTF8; else ≥1 complete multi-byte sequence → LIKELY_UTF8
(a lone truncated lead is no structural evidence); else AMBIGUOUS
(pure ASCII, or truncated-lead-only).
Returns the enum constant of this class with the specified name.
StructuralEncodingRules.Utf8Result.values()
Returns an array containing the constants of this enum class, in
the order they are declared.