cdrBufOutput buf = new cdrBufOutput(512);
BufferedCdrOutput buf = new BufferedCdrOutput(512);
  public TaggedComponent get_effective_component(int id)    throws BAD_PARAM  {    if (id == TAG_CODE_SETS.value)      {        // Codesets are encoded separately.        cdrBufOutput buf = new cdrBufOutput(512);        buf.setOrb(orb);        ior.Internet.CodeSets.write(buf);        TaggedComponent t = new TaggedComponent();        t.tag = TAG_CODE_SETS.value;        t.component_data = buf.buffer.toByteArray();        return t;      }    else      {        for (int i = 0; i < ior.Internet.components.size(); i++)          {            TaggedComponent c =              (TaggedComponent) ior.Internet.components.get(i);            if (c.tag == id)              return c;          }      }    throw new BAD_PARAM("No component " + id + " in the Internet profile", 28,      CompletionStatus.COMPLETED_MAYBE    );  }