Top Description Methods
com.sun.tools.rngdatatype

public Interface DatatypeStreamingValidator

Known Direct Implementers
com.sun.tools.rngdatatype.helpers.StreamingValidatorImpl

Datatype streaming validator.

The streaming validator is an optional feature that is useful for certain Datatypes. It allows the caller to incrementally provide the literal.

Authors
James Clark, Kohsuke KAWAGUCHI

Method Summary

Modifier and TypeMethod and Description
public void
addCharacters(char[] buf, int start, int len)

Passes an additional fragment of the literal.

public void
checkValid()

Similar to the isValid method, but this method throws Exception (with possibly diagnostic information), instead of returning false.

public boolean

Returns:

True if it is valid. False if otherwise.
isValid
()

Tells if the accumulated literal is valid with respect to the underlying Datatype.

Method Detail

addCharactersback to summary
public void addCharacters(char[] buf, int start, int len)

Passes an additional fragment of the literal.

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.

checkValidback to summary
public void checkValid() throws DatatypeException

Similar to the isValid method, but this method throws Exception (with possibly diagnostic information), instead of returning false.

Exceptions
DatatypeException:
If the callee supports the diagnosis and the accumulated literal is invalid, then this exception that possibly contains diagnosis information is thrown.
isValidback to summary
public boolean isValid()

Tells if the accumulated literal is valid with respect to the underlying Datatype.

Returns:boolean

True if it is valid. False if otherwise.