本文整理了Java中org.glassfish.grizzly.Buffer.getInt()
方法的一些代码示例,展示了Buffer.getInt()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Buffer.getInt()
方法的具体详情如下:
包路径:org.glassfish.grizzly.Buffer
类名称:Buffer
方法名:getInt
[英]Relative get method for reading an int value.
Reads the next four bytes at this buffer's current position, composing them into an int value according to the current byte order, and then increments the position by four.
[中]用于读取int值的相对get方法。
读取该缓冲区当前位置的下四个字节,根据当前字节顺序将它们组合成一个int值,然后将该位置递增四。
代码示例来源:origin: org.glassfish.grizzly/grizzly-websockets-server
public static Http2Frame fromBuffer(final int streamId, final Buffer frameBuffer) {
GoAwayFrame frame = create();
frame.setStreamId(streamId);
frame.lastStreamId = frameBuffer.getInt() & 0x7fffffff;
frame.errorCode = ErrorCode.lookup(frameBuffer.getInt());
frame.additionalDebugData = frameBuffer.hasRemaining()
? frameBuffer
: null;
frame.setFrameBuffer(frameBuffer);
return frame;
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-http2
public static Http2Frame fromBuffer(final int streamId, final Buffer frameBuffer) {
GoAwayFrame frame = create();
frame.setStreamId(streamId);
frame.lastStreamId = frameBuffer.getInt() & 0x7fffffff;
frame.errorCode = ErrorCode.lookup(frameBuffer.getInt());
frame.additionalDebugData = frameBuffer.hasRemaining()
? frameBuffer
: null;
frame.setFrameBuffer(frameBuffer);
return frame;
}
代码示例来源:origin: javaee/grizzly
public static Http2Frame fromBuffer(final int flags, final int streamId,
final Buffer frameBuffer) {
WindowUpdateFrame frame = create();
frame.setFlags(flags);
frame.setStreamId(streamId);
frame.setFrameBuffer(frameBuffer);
frame.windowSizeIncrement = frameBuffer.getInt() & 0x7fffffff;
return frame;
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-http-server-core
public static Http2Frame fromBuffer(final int flags, final int streamId,
final Buffer frameBuffer) {
WindowUpdateFrame frame = create();
frame.setFlags(flags);
frame.setStreamId(streamId);
frame.setFrameBuffer(frameBuffer);
frame.windowSizeIncrement = frameBuffer.getInt() & 0x7fffffff;
return frame;
}
代码示例来源:origin: javaee/grizzly
public static Http2Frame fromBuffer(final int flags, final int streamId,
final Buffer frameBuffer) {
WindowUpdateFrame frame = create();
frame.setFlags(flags);
frame.setStreamId(streamId);
frame.setFrameBuffer(frameBuffer);
frame.windowSizeIncrement = frameBuffer.getInt() & 0x7fffffff;
return frame;
}
代码示例来源:origin: javaee/grizzly
public static Http2Frame fromBuffer(final int flags, final int streamId,
final Buffer frameBuffer) {
WindowUpdateFrame frame = create();
frame.setFlags(flags);
frame.setStreamId(streamId);
frame.setFrameBuffer(frameBuffer);
frame.windowSizeIncrement = frameBuffer.getInt() & 0x7fffffff;
return frame;
}
代码示例来源:origin: javaee/grizzly
public static Http2Frame fromBuffer(final int flags, final int streamId,
final Buffer frameBuffer) {
WindowUpdateFrame frame = create();
frame.setFlags(flags);
frame.setStreamId(streamId);
frame.setFrameBuffer(frameBuffer);
frame.windowSizeIncrement = frameBuffer.getInt() & 0x7fffffff;
return frame;
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-http2
public static Http2Frame fromBuffer(final int flags, final int streamId,
final Buffer frameBuffer) {
WindowUpdateFrame frame = create();
frame.setFlags(flags);
frame.setStreamId(streamId);
frame.setFrameBuffer(frameBuffer);
frame.windowSizeIncrement = frameBuffer.getInt() & 0x7fffffff;
return frame;
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-websockets-server
public static Http2Frame fromBuffer(final int flags, final int streamId,
final Buffer frameBuffer) {
RstStreamFrame frame = create();
frame.setFlags(flags);
frame.setStreamId(streamId);
frame.setFrameBuffer(frameBuffer);
frame.errorCode = ErrorCode.lookup(frameBuffer.getInt());
return frame;
}
代码示例来源:origin: javaee/grizzly
public static Http2Frame fromBuffer(final int flags, final int streamId,
final Buffer frameBuffer) {
RstStreamFrame frame = create();
frame.setFlags(flags);
frame.setStreamId(streamId);
frame.setFrameBuffer(frameBuffer);
frame.errorCode = ErrorCode.lookup(frameBuffer.getInt());
return frame;
}
代码示例来源:origin: javaee/grizzly
public static Http2Frame fromBuffer(final int streamId, final Buffer frameBuffer) {
PriorityFrame frame = create();
frame.setStreamId(streamId);
frame.length = frameBuffer.remaining();
final int dependency = frameBuffer.getInt();
frame.streamDependency = dependency & 0x7fffffff;
frame.isExclusive = (dependency & 1L << 31) != 0; // last bit is set
frame.weight = frameBuffer.get() & 0xff;
frame.setFrameBuffer(frameBuffer);
return frame;
}
代码示例来源:origin: javaee/grizzly
public static Http2Frame fromBuffer(final int flags, final int streamId,
final Buffer frameBuffer) {
RstStreamFrame frame = create();
frame.setFlags(flags);
frame.setStreamId(streamId);
frame.setFrameBuffer(frameBuffer);
frame.errorCode = ErrorCode.lookup(frameBuffer.getInt());
return frame;
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-core
@Override
public int getInt(final int index) {
checkDispose();
checkIndex(index);
if (upperBound - index >= 4) {
return activeBuffer.getInt(toActiveBufferPos(index));
} else {
return ((bigEndian) ? makeIntB(index) : makeIntL(index));
}
}
代码示例来源:origin: javaee/grizzly
public static Http2Frame fromBuffer(final int flags, final int streamId,
final Buffer frameBuffer) {
RstStreamFrame frame = create();
frame.setFlags(flags);
frame.setStreamId(streamId);
frame.setFrameBuffer(frameBuffer);
frame.errorCode = ErrorCode.lookup(frameBuffer.getInt());
return frame;
}
代码示例来源:origin: javaee/grizzly
public static Http2Frame fromBuffer(final int streamId, final Buffer frameBuffer) {
PriorityFrame frame = create();
frame.setStreamId(streamId);
frame.length = frameBuffer.remaining();
final int dependency = frameBuffer.getInt();
frame.streamDependency = dependency & 0x7fffffff;
frame.isExclusive = (dependency & 1L << 31) != 0; // last bit is set
frame.weight = frameBuffer.get() & 0xff;
frame.setFrameBuffer(frameBuffer);
return frame;
}
代码示例来源:origin: javaee/grizzly
@Override
public int getInt(final int index) {
checkDispose();
checkIndex(index);
if (upperBound - index >= 4) {
return activeBuffer.getInt(toActiveBufferPos(index));
} else {
return ((bigEndian) ? makeIntB(index) : makeIntL(index));
}
}
代码示例来源:origin: javaee/grizzly
@Override
public int getInt(final int index) {
checkDispose();
checkIndex(index);
if (upperBound - index >= 4) {
return activeBuffer.getInt(toActiveBufferPos(index));
} else {
return ((bigEndian) ? makeIntB(index) : makeIntL(index));
}
}
代码示例来源:origin: javaee/grizzly
public static Http2Frame fromBuffer(final int streamId, final Buffer frameBuffer) {
PriorityFrame frame = create();
frame.setStreamId(streamId);
frame.length = frameBuffer.remaining();
final int dependency = frameBuffer.getInt();
frame.streamDependency = dependency & 0x7fffffff;
frame.isExclusive = (dependency & 1L << 31) != 0; // last bit is set
frame.weight = frameBuffer.get() & 0xff;
frame.setFrameBuffer(frameBuffer);
return frame;
}
代码示例来源:origin: javaee/grizzly
public static Http2Frame fromBuffer(final int streamId, final Buffer frameBuffer) {
PriorityFrame frame = create();
frame.setStreamId(streamId);
frame.length = frameBuffer.remaining();
final int dependency = frameBuffer.getInt();
frame.streamDependency = dependency & 0x7fffffff;
frame.isExclusive = (dependency & 1L << 31) != 0; // last bit is set
frame.weight = frameBuffer.get() & 0xff;
frame.setFrameBuffer(frameBuffer);
return frame;
}
代码示例来源:origin: javaee/grizzly
public static Http2Frame fromBuffer(final int flags, final int streamId,
final Buffer frameBuffer) {
RstStreamFrame frame = create();
frame.setFlags(flags);
frame.setStreamId(streamId);
frame.setFrameBuffer(frameBuffer);
frame.errorCode = ErrorCode.lookup(frameBuffer.getInt());
return frame;
}
内容来源于网络,如有侵权,请联系作者删除!