org.glassfish.grizzly.Buffer.getLong()方法的使用及代码示例

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

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

Buffer.getLong介绍

[英]Relative get method for reading a long value.

Reads the next eight bytes at this buffer's current position, composing them into a long value according to the current byte order, and then increments the position by eight.
[中]用于读取长值的相对get方法。
读取该缓冲区当前位置的下八个字节,根据当前字节顺序将它们组合成一个长值,然后将该位置递增八。

代码示例

代码示例来源:origin: org.glassfish.shoal/shoal-gms-impl

@Override
public long getLong(final int index) {
  return grizzlyBuffer.getLong(index);
}

代码示例来源:origin: javaee/grizzly

@Override
public long getLong(final int index) {
  checkDispose();
  checkIndex(index);
  if (upperBound - index >= 8) {
    return activeBuffer.getLong(toActiveBufferPos(index));
  } else {
    return ((bigEndian) ? makeLongB(index) : makeLongL(index));
  }
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-http-server-core

@Override
public long getLong(final int index) {
  checkDispose();
  checkIndex(index);
  if (upperBound - index >= 8) {
    return activeBuffer.getLong(toActiveBufferPos(index));
  } else {
    return ((bigEndian) ? makeLongB(index) : makeLongL(index));
  }
}

代码示例来源:origin: javaee/grizzly

@Override
public long getLong(final int index) {
  checkDispose();
  checkIndex(index);
  if (upperBound - index >= 8) {
    return activeBuffer.getLong(toActiveBufferPos(index));
  } else {
    return ((bigEndian) ? makeLongB(index) : makeLongL(index));
  }
}

代码示例来源:origin: javaee/grizzly

@Override
public long getLong(final int index) {
  checkDispose();
  checkIndex(index);
  if (upperBound - index >= 8) {
    return activeBuffer.getLong(toActiveBufferPos(index));
  } else {
    return ((bigEndian) ? makeLongB(index) : makeLongL(index));
  }
}

代码示例来源:origin: javaee/grizzly

@Override
public long getLong(final int index) {
  checkDispose();
  checkIndex(index);
  if (upperBound - index >= 8) {
    return activeBuffer.getLong(toActiveBufferPos(index));
  } else {
    return ((bigEndian) ? makeLongB(index) : makeLongL(index));
  }
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-core

@Override
public long getLong(final int index) {
  checkDispose();
  checkIndex(index);
  if (upperBound - index >= 8) {
    return activeBuffer.getLong(toActiveBufferPos(index));
  } else {
    return ((bigEndian) ? makeLongB(index) : makeLongL(index));
  }
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-websockets-server

@Override
public long getLong(final int index) {
  checkDispose();
  checkIndex(index);
  if (upperBound - index >= 8) {
    return activeBuffer.getLong(toActiveBufferPos(index));
  } else {
    return ((bigEndian) ? makeLongB(index) : makeLongL(index));
  }
}

代码示例来源:origin: javaee/grizzly

@Override
public long getLong(final int index) {
  checkDispose();
  checkIndex(index);
  if (upperBound - index >= 8) {
    return activeBuffer.getLong(toActiveBufferPos(index));
  } else {
    return ((bigEndian) ? makeLongB(index) : makeLongL(index));
  }
}

代码示例来源:origin: javaee/grizzly

@Override
public long getLong(final int index) {
  checkDispose();
  checkIndex(index);
  if (upperBound - index >= 8) {
    return activeBuffer.getLong(toActiveBufferPos(index));
  } else {
    return ((bigEndian) ? makeLongB(index) : makeLongL(index));
  }
}

代码示例来源:origin: javaee/grizzly

@Override
public long getLong(final int index) {
  checkDispose();
  checkIndex(index);
  if (upperBound - index >= 8) {
    return activeBuffer.getLong(toActiveBufferPos(index));
  } else {
    return ((bigEndian) ? makeLongB(index) : makeLongL(index));
  }
}

代码示例来源:origin: javaee/grizzly

public static Http2Frame fromBuffer(final int flags, final int streamId, final Buffer frameBuffer) {
  PingFrame frame = create();
  frame.setFlags(flags);
  frame.setStreamId(streamId);
  frame.setFrameBuffer(frameBuffer);
  if (frameBuffer.remaining() != 8) {
    frame.length = frameBuffer.remaining();
  } else {
    frame.opaqueData = frameBuffer.getLong();
  }
  
  return frame;
}

代码示例来源:origin: javaee/grizzly

public static Http2Frame fromBuffer(final int flags, final int streamId, final Buffer frameBuffer) {
  PingFrame frame = create();
  frame.setFlags(flags);
  frame.setStreamId(streamId);
  frame.setFrameBuffer(frameBuffer);
  if (frameBuffer.remaining() != 8) {
    frame.length = frameBuffer.remaining();
  } else {
    frame.opaqueData = frameBuffer.getLong();
  }
  
  return frame;
}

代码示例来源:origin: javaee/grizzly

public static Http2Frame fromBuffer(final int flags, final int streamId, final Buffer frameBuffer) {
  PingFrame frame = create();
  frame.setFlags(flags);
  frame.setStreamId(streamId);
  frame.setFrameBuffer(frameBuffer);
  if (frameBuffer.remaining() != 8) {
    frame.length = frameBuffer.remaining();
  } else {
    frame.opaqueData = frameBuffer.getLong();
  }
  
  return frame;
}

代码示例来源:origin: javaee/grizzly

public static Http2Frame fromBuffer(final int flags, final int streamId, final Buffer frameBuffer) {
  PingFrame frame = create();
  frame.setFlags(flags);
  frame.setStreamId(streamId);
  frame.setFrameBuffer(frameBuffer);
  if (frameBuffer.remaining() != 8) {
    frame.length = frameBuffer.remaining();
  } else {
    frame.opaqueData = frameBuffer.getLong();
  }
  
  return frame;
}

代码示例来源:origin: javaee/grizzly

public static Http2Frame fromBuffer(final int flags, final int streamId, final Buffer frameBuffer) {
  PingFrame frame = create();
  frame.setFlags(flags);
  frame.setStreamId(streamId);
  frame.setFrameBuffer(frameBuffer);
  if (frameBuffer.remaining() != 8) {
    frame.length = frameBuffer.remaining();
  } else {
    frame.opaqueData = frameBuffer.getLong();
  }
  
  return frame;
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-http-server-core

public static Http2Frame fromBuffer(final int flags, final int streamId, final Buffer frameBuffer) {
  PingFrame frame = create();
  frame.setFlags(flags);
  frame.setStreamId(streamId);
  frame.setFrameBuffer(frameBuffer);
  if (frameBuffer.remaining() != 8) {
    frame.length = frameBuffer.remaining();
  } else {
    frame.opaqueData = frameBuffer.getLong();
  }
  
  return frame;
}

代码示例来源:origin: javaee/grizzly

public static Http2Frame fromBuffer(final int flags, final int streamId, final Buffer frameBuffer) {
  PingFrame frame = create();
  frame.setFlags(flags);
  frame.setStreamId(streamId);
  frame.setFrameBuffer(frameBuffer);
  if (frameBuffer.remaining() != 8) {
    frame.length = frameBuffer.remaining();
  } else {
    frame.opaqueData = frameBuffer.getLong();
  }
  
  return frame;
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-http2

public static Http2Frame fromBuffer(final int flags, final int streamId, final Buffer frameBuffer) {
  PingFrame frame = create();
  frame.setFlags(flags);
  frame.setStreamId(streamId);
  frame.setFrameBuffer(frameBuffer);
  if (frameBuffer.remaining() != 8) {
    frame.length = frameBuffer.remaining();
  } else {
    frame.opaqueData = frameBuffer.getLong();
  }
  
  return frame;
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-websockets-server

public static Http2Frame fromBuffer(final int flags, final int streamId, final Buffer frameBuffer) {
  PingFrame frame = create();
  frame.setFlags(flags);
  frame.setStreamId(streamId);
  frame.setFrameBuffer(frameBuffer);
  if (frameBuffer.remaining() != 8) {
    frame.length = frameBuffer.remaining();
  } else {
    frame.opaqueData = frameBuffer.getLong();
  }
  
  return frame;
}

相关文章