}
// Now, let's decode the Ticket
Asn1Decoder ticketDecoder = new Asn1Decoder();
TicketContainer ticketContainer = new TicketContainer( kdcReqBodyContainer.getStream() );
// We have to move back to the Ticket tag
kdcReqBodyContainer.rewind();
// Decode the Ticket PDU
try
{
ticketDecoder.decode( kdcReqBodyContainer.getStream(), ticketContainer );
}
catch ( DecoderException de )
{
throw de;
}
// Update the expected length for the current TLV
tlv.setExpectedLength( tlv.getExpectedLength() - tlv.getLength() );
// Update the parent
kdcReqBodyContainer.updateParent();
// Store the Ticket in the container
Ticket ticket = ticketContainer.getTicket();
KdcReqBody kdcReqBody = kdcReqBodyContainer.getKdcReqBody();
kdcReqBody.addAdditionalTicket( ticket );
kdcReqBodyContainer.setGrammarEndAllowed( true );