public void write(ByteArrayBuffer writer) {
   if (slotModified()) {
     writer.writeInt(_key);
     writer.writeInt(_newSlot.address());
     writer.writeInt(_newSlot.length());
   }
 }
 public Slot debugReadPointerSlot(int id) {
   if (Deploy.debug) {
     readBytes(_pointerIo._buffer, id, Const4.POINTER_LENGTH);
     _pointerIo.seek(0);
     _pointerIo.readBegin(Const4.YAPPOINTER);
     int debugAddress = _pointerIo.readInt();
     int debugLength = _pointerIo.readInt();
     _pointerIo.readEnd();
     return new Slot(debugAddress, debugLength);
   }
   return null;
 }
  public ByteArrayBuffer readBufferBySlot(Slot slot) {
    if (Slot.isNull(slot)) {
      return null;
    }

    if (DTrace.enabled) {
      DTrace.READ_SLOT.logLength(slot.address(), slot.length());
    }

    ByteArrayBuffer buffer = new ByteArrayBuffer(slot.length());

    buffer.readEncrypt(this, slot.address());
    return buffer;
  }
 public void writePointer(int id, Slot slot) {
   if (DTrace.enabled) {
     DTrace.WRITE_POINTER.log(id);
     DTrace.WRITE_POINTER.logLength(slot);
   }
   _pointerIo.seek(0);
   if (Deploy.debug) {
     _pointerIo.writeBegin(Const4.YAPPOINTER);
   }
   _pointerIo.writeInt(slot.address());
   _pointerIo.writeInt(slot.length());
   if (Deploy.debug) {
     _pointerIo.writeEnd();
   }
   if (Debug4.xbytes) {
     _pointerIo.checkXBytes(false);
   }
   writeBytes(_pointerIo, id, 0);
 }
 public Object read(ByteArrayBuffer reader) {
   SlotChange change = new SlotChange(reader.readInt());
   Slot newSlot = new Slot(reader.readInt(), reader.readInt());
   change.newSlot(newSlot);
   return change;
 }