name2.length());
nameLength);
  public int writeToBuffer(int index, 			   List agentNames,			   int [] uidAgentIndex,			   long [] uidLong,			   char [] instanceStringBuffer,			   long [] instanceLongBuffer,			   int [] instanceIntBuffer,			   boolean [] instanceBooleanBuffer			   ) throws IOException {    // UIDs    int agentIndex;    if ((agentIndex = agentNames.indexOf(UID.getOwner().intern())) == -1) {      agentNames.add (UID.getOwner().intern());      agentIndex = agentNames.indexOf(UID.getOwner());    }    uidAgentIndex[index*numUID] = agentIndex;    uidLong[index*numUID] = UID.getId();    if ((agentIndex = agentNames.indexOf(ownerID.intern())) == -1) {      agentNames.add (ownerID.intern());      agentIndex = agentNames.indexOf(ownerID);    }    uidAgentIndex[(index*numUID)+1] = agentIndex;    uidLong[(index*numUID)+1] = 0;    // Strings    String nomen = (itemNomen != null) ? itemNomen : "no_nomen";    System.arraycopy (nomen.toCharArray(), 0, 		      instanceStringBuffer, (index*numString + 0)*maxStringLength, 		      nomen.length());    String proto = (prototypeUID != null) ? prototypeUID : "no_proto";    System.arraycopy (proto.toCharArray(), 0, 		      instanceStringBuffer, (index*numString + 1)*maxStringLength, 		      proto.length());    String name2 = (name != null) ? name : "no_name";    System.arraycopy (name2.toCharArray(), 0, 		      instanceStringBuffer, (index*numString + 2)*maxStringLength, 		      name2.length());    // longs    instanceLongBuffer[index*numLong] = aggregateNumber;    // booleans    instanceBooleanBuffer[index*numBoolean] = hasManifest;    // ints    if (hasManifest)       instanceIntBuffer[index*numInt] = nomenclatures.size();    return instanceIntBuffer[index*numInt];  }