org.fusesource.hawtbuf.Buffer.toByteArray()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(159)

本文整理了Java中org.fusesource.hawtbuf.Buffer.toByteArray()方法的一些代码示例,展示了Buffer.toByteArray()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Buffer.toByteArray()方法的具体详情如下:
包路径:org.fusesource.hawtbuf.Buffer
类名称:Buffer
方法名:toByteArray

Buffer.toByteArray介绍

暂无

代码示例

代码示例来源:origin: fusesource/mqtt-client

public byte[] getPayload() {
  return payload.toByteArray();
}

代码示例来源:origin: apache/storm

public void onPublish(UTF8Buffer topic, Buffer payload, Runnable ack) {
  LOG.debug("Received message: topic={}, payload={}", topic.toString(), new String(payload.toByteArray()));
  try {
    this.incoming.put(new AckableMessage(topic.toString(), payload.toByteArray(), ack));
  } catch (InterruptedException e) {
    LOG.warn("Interrupted while queueing an MQTT message.");
  }
}

代码示例来源:origin: fusesource/mqtt-client

public SUBACK decode(MQTTFrame frame) throws ProtocolException {
  assert(frame.buffers.length == 1);
  DataByteArrayInputStream is = new DataByteArrayInputStream(frame.buffers[0]);
  messageId = is.readShort();
  grantedQos = is.readBuffer(is.available()).toByteArray();
  return this;
}

代码示例来源:origin: org.apache.activemq/apollo-broker

/**
 * Returns the global transaction identifier for this XID.
 *
 * @return the global transaction identifier
 */
public byte[] getGlobalTransactionId() {
  // TODO.. may want to compact() first and keep cache that..
  return globalTransactionId.toByteArray();
}

代码示例来源:origin: org.apache.activemq/apollo-broker

/**
 * Returns the branch qualifier for this XID.
 *
 * @return the branch qualifier
 */
public byte[] getBranchQualifier() {
  // TODO.. may want to compact() first and keep cache that..
  return branchQualifier.toByteArray();
}

代码示例来源:origin: org.apache.activemq/activemq-osgi

final public Buffer compact() {
  if (length != data.length) {
    return new Buffer(toByteArray());
  }
  return this;
}

代码示例来源:origin: org.apache.activemq/activemq-all

final public Buffer compact() {
  if (length != data.length) {
    return new Buffer(toByteArray());
  }
  return this;
}

代码示例来源:origin: org.fusesource.hawtbuf/hawtbuf

final public Buffer compact() {
  if (length != data.length) {
    return new Buffer(toByteArray());
  }
  return this;
}

代码示例来源:origin: org.apache.activemq/activemq-all

public byte[] toUnframedByteArray() {
  return toUnframedBuffer().toByteArray();
}

代码示例来源:origin: org.apache.activemq/activemq-all

public byte[] toFramedByteArray() {
  return toFramedBuffer().toByteArray();
}

代码示例来源:origin: org.apache.activemq/activemq-all

public byte[] toUnframedByteArray() {
  return toUnframedBuffer().toByteArray();
}

代码示例来源:origin: org.apache.activemq/activemq-all

public byte[] toFramedByteArray() {
  return toFramedBuffer().toByteArray();
}

代码示例来源:origin: org.apache.activemq/activemq-all

public byte[] toFramedByteArray() {
  return toFramedBuffer().toByteArray();
}

代码示例来源:origin: org.apache.activemq/activemq-all

public byte[] toUnframedByteArray() {
  return toUnframedBuffer().toByteArray();
}

代码示例来源:origin: org.apache.activemq/activemq-all

public byte[] toFramedByteArray() {
  return toFramedBuffer().toByteArray();
}

代码示例来源:origin: org.apache.activemq/activemq-all

public byte[] toFramedByteArray() {
  return toFramedBuffer().toByteArray();
}

代码示例来源:origin: org.apache.activemq/activemq-all

public byte[] toUnframedByteArray() {
  return toUnframedBuffer().toByteArray();
}

代码示例来源:origin: org.apache.activemq/activemq-all

public byte[] toUnframedByteArray() {
  return toUnframedBuffer().toByteArray();
}

代码示例来源:origin: org.apache.activemq/activemq-console

public byte[] toFramedByteArray() {
  return toFramedBuffer().toByteArray();
}

代码示例来源:origin: org.fusesource.mqtt-client/mqtt-client

public SUBACK decode(MQTTFrame frame) throws ProtocolException {
  assert(frame.buffers.length == 1);
  DataByteArrayInputStream is = new DataByteArrayInputStream(frame.buffers[0]);
  messageId = is.readShort();
  grantedQos = is.readBuffer(is.available()).toByteArray();
  return this;
}

相关文章