// decoder for KrbCredInfo
Asn1Decoder decoder = new Asn1Decoder();
// KrbCredInfo container
KrbCredInfoContainer ticketInfoContainer = new KrbCredInfoContainer();
ticketInfoContainer.setStream( encKrbCredPartContainer.getStream() );
encKrbCredPartContainer.rewind();
try
{
// decode KrbCredInfo
decoder.decode( encKrbCredPartContainer.getStream(), ticketInfoContainer );
}
catch ( DecoderException e )
{
throw e;
}
KrbCredInfo ticketInfo = ticketInfoContainer.getKrbCredInfo();
// add KrbCredInfo to the list of ticket-info
encKrbCredPartContainer.getEncKrbCredPart().addTicketInfo( ticketInfo );
// Update the expected length for the current TLV
tlv.setExpectedLength( tlv.getExpectedLength() - tlv.getLength() );