}
// Now, let's decode the HostAddress
Asn1Decoder hostAddressDecoder = new Asn1Decoder();
HostAddressContainer hostAddressContainer = new HostAddressContainer();
// Passes the Stream to the decoder
hostAddressContainer.setStream( container.getStream() );
// Decode the HostAddress PDU
try
{
hostAddressDecoder.decode( container.getStream(), hostAddressContainer );
}
catch ( DecoderException de )
{
throw de;
}
// Store the HostAddress in the container
HostAddress hostAddress = hostAddressContainer.getHostAddress();
// Update the expected length for the current TLV
tlv.setExpectedLength( tlv.getExpectedLength() - tlv.getLength() );
// Update the parent