コード例 #1
0
  protected void putDBPointer(String name, String ns, ObjectId oid) {
    _put(REF, name);

    _putValueString(ns);
    _buf.writeInt(oid._time());
    _buf.writeInt(oid._machine());
    _buf.writeInt(oid._inc());
  }
コード例 #2
0
  protected void putDBRef(String name, DBRefBase ref) {
    _put(OBJECT, name);
    final int sizePos = _buf.getPosition();
    _buf.writeInt(0);

    _putObjectField("$ref", ref.getRef());
    _putObjectField("$id", ref.getId());

    _buf.write(EOO);
    _buf.writeInt(sizePos, _buf.getPosition() - sizePos);
  }