/**
   * @param in Object input.
   * @return Read collection.
   * @throws IOException If failed.
   * @throws ClassNotFoundException If failed.
   */
  private Collection<Object> readFieldsCollection(ObjectInput in)
      throws IOException, ClassNotFoundException {
    assert fields;

    int size = in.readInt();

    if (size == -1) return null;

    Collection<Object> res = new ArrayList<>(size);

    for (int i = 0; i < size; i++) {
      int size0 = in.readInt();

      Collection<Object> col = new ArrayList<>(size0);

      for (int j = 0; j < size0; j++) col.add(in.readObject());

      assert col.size() == size0;

      res.add(col);
    }

    assert res.size() == size;

    return res;
  }
示例#2
0
 @Override
 public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
   this.baseOffset = BYTE_ARRAY_OFFSET;
   this.sizeInBytes = in.readInt();
   this.numFields = in.readInt();
   this.bitSetWidthInBytes = calculateBitSetWidthInBytes(numFields);
   this.baseObject = new byte[sizeInBytes];
   in.readFully((byte[]) baseObject);
 }
 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 val = in.readInt();
     this.add(val);
   }
 }
 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);
   }
 }
 @Override
 public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
   int v1 = in.readInt();
   int v2 = in.readInt();
   int v3 = in.readInt();
   bytes1 = new byte[v2];
   in.readFully(bytes1);
   bytes2 = new byte[v3];
   in.readFully(bytes2);
   int v4 = 0;
 }
 @Override
 public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
   if (in.readBoolean()) {
     descColumns = new boolean[in.readInt()];
     for (int i = 0; i < descColumns.length; i++) descColumns[i] = in.readBoolean();
   }
   if (in.readBoolean()) {
     nullsOrderedLow = new boolean[in.readInt()];
     for (int i = 0; i < nullsOrderedLow.length; i++) nullsOrderedLow[i] = in.readBoolean();
   }
 }
 @Override
 public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
   int len = in.readInt();
   for (int i = 0; i < len; i++) {
     add(in.readObject());
   }
 }
  public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    // esto es solo para serializar tickets que no estan en la bolsa de tickets pendientes
    m_sId = (String) in.readObject();
    tickettype = in.readInt();
    m_iTicketId = in.readInt();
    m_iTicketNCF = in.readInt(); // NCF
    m_Customer = (CustomerInfoExt) in.readObject();
    m_dDate = (Date) in.readObject();
    attributes = (Properties) in.readObject();
    m_aLines = (List<TicketLineInfo>) in.readObject();
    m_User = null;
    m_sActiveCash = null;

    payments = new ArrayList<PaymentInfo>();
    taxes = null;
  }
 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);
     }
   }
 }
示例#11
0
  @Override
  public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    int len = in.readInt();
    byte[] b = new byte[len];

    // read fully
    int done = 0;
    while (done < len) {
      int got = in.read(b, done, len - done);
      if (got < 0) throw new IOException();
      done += got;
    }

    FileSystemProto.Directory proto = FileSystemProto.Directory.parseFrom(b);

    path = proto.getPath();
    lastModified = proto.getLastModified();
    List<FileSystemProto.File> files = proto.getFilesList();
    children = new CacheFileProto[files.size()];
    for (int i = 0; i < files.size(); i++) {
      FileSystemProto.File fp = files.get(i);
      CacheFileProto cf = new CacheFileProto();
      cf.setShortName(fp.getName());
      cf.setDirectory(fp.getIsDirectory());
      cf.setLastModified(fp.getLastModified());
      cf.setLength(fp.getLength());

      children[i] = cf;
    }
  }
  /** {@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) {
      int key = in.readInt();
      int val = in.readInt();
      put(key, val);
    }
  }
示例#13
0
 @Override
 public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
   firstName = in.readUTF();
   lastName = in.readUTF();
   age = in.readInt();
   mother = (Person) in.readObject();
   father = (Person) in.readObject();
   children = (ArrayList) in.readObject();
 }
  /** {@inheritDoc} */
  @Override
  public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    jobName = U.readString(in);
    user = U.readString(in);

    hasCombiner = in.readBoolean();
    numReduces = in.readInt();

    props = U.readStringMap(in);
  }
示例#15
0
  /** {@inheritDoc} */
  @Override
  public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    src = U.readByteArray(in);

    depMode = GridDeploymentMode.fromOrdinal(in.readInt());

    clsLdrId = U.readGridUuid(in);
    srcClsName = U.readString(in);
    userVer = U.readString(in);
    ldrParties = U.readMap(in);
  }
示例#16
0
  private static void readFrom(ObjectInput o, ViewComponentInfo v)
      throws IOException, ClassNotFoundException {
    v.x = o.readInt();
    v.y = o.readInt();
    v.width = o.readInt();
    v.height = o.readInt();
    v.measuredWidth = o.readInt();
    v.measuredHeight = o.readInt();
    v.scrollX = o.readInt();
    v.scrollY = o.readInt();
    v.absoluteX = o.readInt();
    v.absoluteY = o.readInt();
    v.cameraDistance = o.readFloat();
    v.visible = o.readBoolean();
    v.drawingTime = o.readLong();
    v.isShown = o.readBoolean();
    v.hasFocus = o.readBoolean();
    v.focusable = o.readBoolean();
    v.hasOnClickListener = o.readBoolean();
    v.viewType = (String) o.readObject();
    v.textContent = (String) o.readObject();
    v.isEditText = o.readBoolean();
    v.isInputMethodTarget = o.readBoolean();
    v.isContainer = o.readBoolean();
    v.inputMethod = o.readInt();
    v.id = o.readInt();

    int size = o.readInt();
    if (size != 0) {
      v.children = new LinkedList<ViewComponentInfo>();
      for (int i = 0; i < size; i++) {
        ViewComponentInfo c = new ViewComponentInfo();
        readFrom(o, c);
        v.children.add(c);
      }
    }
  }
  /** {@inheritDoc} */
  @Override
  public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    createTime = in.readLong();
    readTime = in.readLong();
    writeTime = in.readLong();
    commitTime = in.readLong();
    rollbackTime = in.readLong();

    reads = in.readInt();
    writes = in.readInt();
    hits = in.readInt();
    misses = in.readInt();
    txCommits = in.readInt();
    txRollbacks = in.readInt();
  }
示例#18
0
  /** {@inheritDoc} */
  @SuppressWarnings("unchecked")
  @Override
  public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    id = in.readInt();

    String clsName = in.readUTF();

    if (clsName == null) innerSplit = in.readObject();
    else {
      // Split wrapper only used when classes available in our classpath, so Class.forName is ok
      // here.
      Class<Writable> cls = (Class<Writable>) Class.forName(clsName);

      try {
        innerSplit = U.newInstance(cls);
      } catch (GridException e) {
        throw new IOException(e);
      }

      ((Writable) innerSplit).readFields(in);
    }
  }
 /** {@inheritDoc} */
 @Override
 public void readExternal(ObjectInput in) throws IOException {
   cnt = in.readInt();
   initCnt = in.readInt();
   autoDel = in.readBoolean();
 }
示例#20
0
 public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
   base = (CharSequence) in.readObject();
   start = in.readInt();
   end = in.readInt();
 }
示例#21
0
 public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
   offset = BYTE_ARRAY_OFFSET;
   numBytes = in.readInt();
   base = new byte[numBytes];
   in.readFully((byte[]) base);
 }
 /** {@inheritDoc} */
 @Override
 public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
   max = in.readInt();
 }
示例#23
0
 @SuppressWarnings({"unchecked"})
 public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
   in.readInt();
   first = (TA) in.readObject();
   second = (TB) in.readObject();
 }
示例#24
0
	public void readExternal(ObjectInput is) throws IOException
	{
		id = is.readInt();
		x = is.readInt();
		y = is.readInt();
	}
示例#25
0
 public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
   base = (Type) in.readObject();
   minOccurs = in.readInt();
   maxOccurs = in.readInt();
 }