if ( tlv.getLength() == 0 )
{
LOG.error( I18n.err( I18n.ERR_04066 ) );
// This will generate a PROTOCOL_ERROR
throw new DecoderException( I18n.err( I18n.ERR_04067 ) );
}
Checksum checksum = checksumContainer.getChecksum();
// The Checksum's type is an integer
BerValue value = tlv.getValue();
try
{
int cksumType = IntegerDecoder.parse( value );
checksum.setChecksumType( ChecksumType.getTypeByValue( cksumType ) );
if ( IS_DEBUG )
{
LOG.debug( "cksumType : " + cksumType );
}
}
catch ( IntegerDecoderException ide )
{
LOG.error( I18n.err( I18n.ERR_04070, Strings.dumpBytes( value.getData() ), ide
.getLocalizedMessage() ) );
// This will generate a PROTOCOL_ERROR
throw new DecoderException( ide.getMessage() );
}
}