}
// Now, let's decode the HostAddresses
Asn1Decoder hostAddressesDecoder = new Asn1Decoder();
HostAddressesContainer hostAddressesContainer = new HostAddressesContainer();
// Passes the Stream to the decoder
hostAddressesContainer.setStream( container.getStream() );
// Decode the HostAddresses PDU
try
{
hostAddressesDecoder.decode( container.getStream(), hostAddressesContainer );
}
catch ( DecoderException de )
{
throw de;
}
// Store the HostAddresses in the container
HostAddresses hostAddresses = hostAddressesContainer.getHostAddresses();
setHostAddresses( hostAddresses, container );
// Update the expected length for the current TLV
tlv.setExpectedLength( tlv.getExpectedLength() - tlv.getLength() );