org.relaxng.datatype
Interface DataTypeStreamingValidator

All Known Implementing Classes:
StreamingValidatorImpl

public interface DataTypeStreamingValidator

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.

Author:
Kohsuke KAWAGUCHI

Method Summary
 boolean characters(char[] buf, int start, int len)
          let a streaming validator process additional literal fragment.
 boolean isValid()
          gets if the accumulated literal is valid with respect to the underlying datatype.
 void reset()
          purges the accumulated literal, and start all over again.
 

Method Detail

reset

public void reset()
purges the accumulated literal, and start all over again.

This method can be used to reduce the number of the creation of this datatype.


characters

public boolean characters(char[] buf,
                          int start,
                          int len)
let a streaming validator process additional literal fragment.

The application can call this method several times, then call the isValid method to check the validity.

Returns:
the return value of this method is the return value of the isValid method after processing new literal fragment.

isValid

public boolean isValid()
gets if the accumulated literal is valid with respect to the underlying datatype.
Returns:
true if it is valid. False if otherwise.