Internet.version.write(b); b.write_string(Internet.host);  b.write_ushort((short) (Internet.port & 0xFFFF));   b.write_long(key.length); b.write(key);   b.write_long(1);  b.write_long(CodeSets_profile.TAG_CODE_SETS); CodeSets.write(b);  b.close(); } catch (IOException ex)
for (int i = 0; i < profiles.size(); i++)
  public void _write_no_endian(cdrOutput out)  {    try      {        // Write repository id.        out.write_string(Id);        // Always one profile.        out.write_long(1);        // It is the Internet profile.        out.write_long(Internet_profile.TAG_INTERNET_IOP);        // Need to write the Internet profile into the separate        // stream as we must know the size in advance.        cdrOutput b = out.createEncapsulation();        Internet.version.write(b);        b.write_string(Internet.host);        b.write_ushort((short) (Internet.port & 0xFFFF));        // Write the object key.        b.write_long(key.length);        b.write(key);        // One tagged component.        b.write_long(1);        b.write_long(CodeSets_profile.TAG_CODE_SETS);        CodeSets.write(b);        b.close();      }    catch (IOException ex)      {        Unexpected.error(ex);      }  }