public void write(cdrOutput out)
public void write(AbstractCdrOutput out)
    public void write(cdrOutput out)    {      try        {          // Need to write the Internet profile into the separate          // stream as we must know the size in advance.          cdrOutput b = out.createEncapsulation();          version.write(b);          b.write_string(host);          b.write_ushort((short) (port & 0xFFFF));          // Write the object key.          b.write_long(key.length);          b.write(key);          // Number of the tagged components.          b.write_long(1 + components.size());          b.write_long(CodeSets_profile.TAG_CODE_SETS);          CodeSets.write(b);          TaggedComponent t;          for (int i = 0; i < components.size(); i++)            {              t = (TaggedComponent) components.get(i);              TaggedComponentHelper.write(b, t);            }          b.close();        }      catch (Exception e)        {          MARSHAL m = new MARSHAL("Unable to write Internet profile.");          m.minor = Minor.IOR;          m.initCause(e);          throw m;        }    }