public abstract class HexStringFormatAttribute extends AbstractFormatAttribute
This class is particularly useful to validate hexadecimal-based string data. The only two constructor arguments you have to specify are a short description of the validated string and its expected length.
In this package, it is used for validating MD5, SHA1, SHA256 and SHA512 checksums, which are very commonly represented in form of hexadecimal strings of fixed length.
Modifier and Type | Field and Description |
---|---|
protected int |
length |
Modifier | Constructor and Description |
---|---|
protected |
HexStringFormatAttribute(String fmt,
int length) |
Modifier and Type | Method and Description |
---|---|
void |
validate(ProcessingReport report,
MessageBundle bundle,
FullData data)
Validate the instance against this format attribute
|
newMsg, supportedTypes
protected HexStringFormatAttribute(String fmt, int length)
public final void validate(ProcessingReport report, MessageBundle bundle, FullData data) throws ProcessingException
FormatAttribute
report
- the report to usebundle
- the message bundle to usedata
- the validation dataProcessingException
- an exception occurs (normally, never for a
format attribute)