示例#1
0
  public Message getBaseMessage() {
    if (core_msg == null) {
      return new MessageAdapter(plug_msg.getOriginalMessage());
    }

    return core_msg.getBaseMessage();
  }
示例#2
0
  public org.gudy.azureus2.plugins.messaging.Message getOriginalMessage() {
    if (plug_msg == null) {
      return new MessageAdapter(core_msg.getBaseMessage());
    }

    return plug_msg.getOriginalMessage();
  }
示例#3
0
  // core raw message implementation
  public DirectByteBuffer[] getRawData() {
    if (plug_msg == null) {
      return core_msg.getRawData();
    }

    ByteBuffer[] bbs = plug_msg.getRawPayload();
    DirectByteBuffer[] dbbs = new DirectByteBuffer[bbs.length]; // TODO cache it???
    for (int i = 0; i < bbs.length; i++) {
      dbbs[i] = new DirectByteBuffer(bbs[i]);
    }
    return dbbs;
  }
示例#4
0
  // plugin raw message implementation
  public ByteBuffer[] getRawPayload() {
    if (core_msg == null) {
      return plug_msg.getRawPayload();
    }

    DirectByteBuffer[] dbbs = core_msg.getRawData();
    ByteBuffer[] bbs = new ByteBuffer[dbbs.length]; // TODO cache it???
    for (int i = 0; i < dbbs.length; i++) {
      bbs[i] = dbbs[i].getBuffer(DirectByteBuffer.SS_MSG);
    }
    return bbs;
  }