public interface DatatypeStreamingValidator
The streaming validator is an optional feature that is useful for certain Datatypes. It allows the caller to incrementally provide the literal.
Modifier and Type | Method and Description |
---|---|
void |
addCharacters(char[] buf,
int start,
int len)
Passes an additional fragment of the literal.
|
void |
checkValid()
Similar to the isValid method, but this method throws
Exception (with possibly diagnostic information), instead of
returning false.
|
boolean |
isValid()
Tells if the accumulated literal is valid with respect to
the underlying Datatype.
|
void addCharacters(char[] buf, int start, int len)
The application can call this method several times, then call the isValid method (or the checkValid method) to check the validity of the accumulated characters.
boolean isValid()
void checkValid() throws DatatypeException
DatatypeException
- If the callee supports the diagnosis and the accumulated
literal is invalid, then this exception that possibly
contains diagnosis information is thrown.Copyright © 2021 JBoss by Red Hat. All rights reserved.