static void readSlotWithFields(
     short fieldsKey[], ClassMetaDataSlot slot, ObjectInput input, Object obj)
     throws IOException, ClassNotFoundException {
   short numberOfFields = (short) fieldsKey.length;
   for (short i = 0; i < numberOfFields; i++) {
     ClassMetadataField field = slot.getFields()[fieldsKey[i]];
     if (field.getField().getType() == Integer.TYPE) {
       FieldsManager.getFieldsManager().setInt(obj, field, input.readInt());
     } else if (field.getField().getType() == Byte.TYPE) {
       FieldsManager.getFieldsManager().setByte(obj, field, input.readByte());
     } else if (field.getField().getType() == Long.TYPE) {
       FieldsManager.getFieldsManager().setLong(obj, field, input.readLong());
     } else if (field.getField().getType() == Float.TYPE) {
       FieldsManager.getFieldsManager().setFloat(obj, field, input.readFloat());
     } else if (field.getField().getType() == Double.TYPE) {
       FieldsManager.getFieldsManager().setDouble(obj, field, input.readDouble());
     } else if (field.getField().getType() == Short.TYPE) {
       FieldsManager.getFieldsManager().setShort(obj, field, input.readShort());
     } else if (field.getField().getType() == Character.TYPE) {
       FieldsManager.getFieldsManager().setCharacter(obj, field, input.readChar());
     } else if (field.getField().getType() == Boolean.TYPE) {
       FieldsManager.getFieldsManager().setBoolean(obj, field, input.readBoolean());
     } else {
       Object objTmp = input.readObject();
       FieldsManager.getFieldsManager().setObject(obj, field, objTmp);
     }
   }
 }
  // Implements Externalizable
  public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {

    // VERSION
    in.readByte();

    // MAP
    _map = (TCharDoubleMap) in.readObject();
  }
 public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {
   in.readByte();
   int size = in.readInt();
   this.setUp(size);
   while (size-- > 0) {
     final int val = in.readInt();
     this.add(val);
   }
 }
  /** {@inheritDoc} */
  public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    // VERSION
    in.readByte();

    // SUPER
    super.readExternal(in);

    // NUMBER OF ENTRIES
    int size = in.readInt();
    setUp(size);

    // ENTRIES
    while (size-- > 0) {
      byte key = in.readByte();
      short val = in.readShort();
      put(key, val);
    }
  }
  // Implements Externalizable
  @Override
  public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {

    // VERSION
    in.readByte();

    // SET
    _set = (TCharSet) in.readObject();
  }
 public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {
   in.readByte();
   this._pos = in.readInt();
   final int len = in.readInt();
   this._data = new short[len];
   for (int i = 0; i < len; ++i) {
     this._data[i] = in.readShort();
   }
 }
 public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {
   in.readByte();
   int size = in.readInt();
   this.setUp(size);
   while (size-- > 0) {
     final int key = in.readInt();
     final V val = (V) in.readObject();
     this.put(key, val);
   }
 }
示例#8
0
 public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
   in.readByte(); // ignore version for now
   fieldNumber = in.readShort();
   byte fieldType;
   ISOComponent c;
   try {
     while ((fieldType = in.readByte()) != 'E') {
       c = null;
       switch (fieldType) {
         case 'F':
           c = new ISOField();
           break;
         case 'A':
           c = new ISOAmount();
           break;
         case 'B':
           c = new ISOBinaryField();
           break;
         case 'M':
           c = new ISOMsg();
           break;
         case 'H':
           readHeader(in);
           break;
         case 'P':
           readPackager(in);
           break;
         case 'D':
           readDirection(in);
           break;
         default:
           throw new IOException("malformed ISOMsg");
       }
       if (c != null) {
         ((Externalizable) c).readExternal(in);
         set(c);
       }
     }
   } catch (ISOException e) {
     throw new IOException(e.getMessage());
   }
 }
示例#9
0
 protected void readDirection(ObjectInput in) throws IOException, ClassNotFoundException {
   direction = in.readByte();
 }