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

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

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

Buffer.reset介绍

暂无

代码示例

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

@Override
  public void reset(int nextExpectedReadSize) {
    header.reset();
  }
};

代码示例来源:origin: io.fabric8.ipaas.apps/fabric8mq

@Override
  public void reset() throws IOException {
    contentLength = -1;
    payLoadRead = 0;
    scratch.reset();
    currentBuffer = null;
  }
};

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

@Override
  public void reset() throws IOException {
    contentLength = -1;
    payLoadRead = 0;
    scratch.reset();
    currentBuffer = null;
  }
};

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

@Override
  public void reset() throws IOException {
    contentLength = -1;
    payLoadRead = 0;
    scratch.reset();
    currentBuffer = null;
  }
};

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

@Override
  public void reset(int nextExpectedReadSize) {
    header.reset();
  }
};

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

@Override
  public void reset() throws IOException {
    contentLength = -1;
    payLoadRead = 0;
    scratch.reset();
    currentBuffer = null;
  }
};

代码示例来源:origin: io.fabric8.jube.images.fabric8/fabric8-mq

@Override
  public void reset() throws IOException {
    contentLength = -1;
    payLoadRead = 0;
    scratch.reset();
    currentBuffer = null;
  }
};

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

@Override
public void parse(ByteBuffer incoming) throws IOException {
  int length = Math.min(incoming.remaining(), frame.getLength() - frame.offset);
  incoming.get(frame.data, frame.offset, length);
  frame.offset += length;
  if (frame.offset == frame.length) {
    LOG.trace("Contents of size {} have been read", frame.length);
    frame.reset();
    frameSink.onFrame(frame);
    if (currentParser == this) {
      currentParser = initializeFrameLengthParser();
    }
    if (incoming.hasRemaining()) {
      currentParser.parse(incoming);
    }
  }
}

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

@Override
public void parse(ByteBuffer incoming) throws IOException {
  int length = Math.min(incoming.remaining(), frame.getLength() - frame.offset);
  incoming.get(frame.data, frame.offset, length);
  frame.offset += length;
  if (frame.offset == frame.length) {
    LOG.trace("Contents of size {} have been read", frame.length);
    frame.reset();
    frameSink.onFrame(frame);
    if (currentParser == this) {
      currentParser = initializeFrameLengthParser();
    }
    if (incoming.hasRemaining()) {
      currentParser.parse(incoming);
    }
  }
}

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

@Override
public void parse(ByteBuffer incoming) throws IOException {
  int length = Math.min(incoming.remaining(), header.length - header.offset);
  incoming.get(header.data, header.offset, length);
  header.offset += length;
  if (header.offset == AMQP_HEADER_BYTES) {
    header.reset();
    AmqpHeader amqpHeader = new AmqpHeader(header.deepCopy(), false);
    currentParser = initializeFrameLengthParser();
    frameSink.onFrame(amqpHeader);
    if (incoming.hasRemaining()) {
      currentParser.parse(incoming);
    }
  }
}

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

@Override
public void parse(ByteBuffer incoming) throws IOException {
  int length = Math.min(incoming.remaining(), header.length - header.offset);
  incoming.get(header.data, header.offset, length);
  header.offset += length;
  if (header.offset == AMQP_HEADER_BYTES) {
    header.reset();
    AmqpHeader amqpHeader = new AmqpHeader(header.deepCopy(), false);
    currentParser = initializeFrameLengthParser();
    frameSink.onFrame(amqpHeader);
    if (incoming.hasRemaining()) {
      currentParser.parse(incoming);
    }
  }
}

相关文章