org.apache.qpid.proton.codec.WritableBuffer.putShort()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(131)

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

WritableBuffer.putShort介绍

暂无

代码示例

代码示例来源:origin: org.apache.qpid/proton-j-impl

void writeRaw(final short s)
{
  _buffer.putShort(s);
}

代码示例来源:origin: com.microsoft.azure.iot/proton-j-azure-iot

void writeRaw(final short s)
{
  _buffer.putShort(s);
}

代码示例来源:origin: org.apache.qpid/proton

void writeRaw(final short s)
{
  _buffer.putShort(s);
}

代码示例来源:origin: org.apache.qpid/proton-j

void writeRaw(final short s)
{
  _buffer.putShort(s);
}

代码示例来源:origin: org.apache.qpid/proton-j

@Override
public void putShort(short s)
{
  int remaining = _first.remaining();
  if(remaining >= 2)
  {
    _first.putShort(s);
  }
  else if(remaining ==0 )
  {
    _second.putShort(s);
  }
  else
  {
    ByteBuffer wrap = ByteBuffer.wrap(new byte[2]);
    wrap.putShort(s);
    wrap.flip();
    put(wrap);
  }
}

代码示例来源:origin: org.apache.qpid/proton-j-impl

public void putShort(short s)
{
  int remaining = _first.remaining();
  if(remaining >= 2)
  {
    _first.putShort(s);
  }
  else if(remaining ==0 )
  {
    _second.putShort(s);
  }
  else
  {
    ByteBuffer wrap = ByteBuffer.wrap(new byte[2]);
    wrap.putShort(s);
    wrap.flip();
    put(wrap);
  }
}

代码示例来源:origin: org.apache.qpid/proton

public void putShort(short s)
{
  int remaining = _first.remaining();
  if(remaining >= 2)
  {
    _first.putShort(s);
  }
  else if(remaining ==0 )
  {
    _second.putShort(s);
  }
  else
  {
    ByteBuffer wrap = ByteBuffer.wrap(new byte[2]);
    wrap.putShort(s);
    wrap.flip();
    put(wrap);
  }
}

代码示例来源:origin: com.microsoft.azure.iot/proton-j-azure-iot

public void putShort(short s)
{
  int remaining = _first.remaining();
  if(remaining >= 2)
  {
    _first.putShort(s);
  }
  else if(remaining ==0 )
  {
    _second.putShort(s);
  }
  else
  {
    ByteBuffer wrap = ByteBuffer.wrap(new byte[2]);
    wrap.putShort(s);
    wrap.flip();
    put(wrap);
  }
}

代码示例来源:origin: org.apache.qpid/proton-j-impl

private void endFrame(int channel)
{
  int frameSize = _buffer.position() - _frameStart;
  int limit = _buffer.position();
  _buffer.position(_frameStart);
  _buffer.putInt(frameSize);
  _buffer.put((byte) 2);
  _buffer.put(_frameType);
  _buffer.putShort((short) channel);
  _buffer.position(limit);
  int offset = _bbuf.arrayOffset() + _frameStart;
  //System.out.println("RAW: \"" + new Binary(_bbuf.array(), offset, frameSize) + "\"");
}

代码示例来源:origin: com.microsoft.azure.iot/proton-j-azure-iot

private void endFrame(int channel)
{
  int frameSize = _buffer.position() - _frameStart;
  int limit = _buffer.position();
  _buffer.position(_frameStart);
  _buffer.putInt(frameSize);
  _buffer.put((byte) 2);
  _buffer.put(_frameType);
  _buffer.putShort((short) channel);
  _buffer.position(limit);
}

代码示例来源:origin: org.apache.qpid/proton

buffer.put((byte) 2);
buffer.put(AMQP_FRAME_TYPE);
buffer.putShort((short) channel);
buffer.position(limit);

代码示例来源:origin: org.apache.qpid/proton

int writeFrame(WritableBuffer buffer, SaslFrameBody frameBody)
{
  int oldPosition = buffer.position();
  buffer.position(buffer.position()+8);
  _encoder.setByteBuffer(buffer);
  _encoder.writeObject(frameBody);
  int frameSize = buffer.position() - oldPosition;
  int limit = buffer.position();
  buffer.position(oldPosition);
  buffer.putInt(frameSize);
  buffer.put((byte) 2);
  buffer.put(SASL_FRAME_TYPE);
  buffer.putShort((short) 0);
  buffer.position(limit);
  return frameSize;
}

相关文章