本文整理了Java中io.netty.buffer.ByteBuf.setByte()
方法的一些代码示例,展示了ByteBuf.setByte()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ByteBuf.setByte()
方法的具体详情如下:
包路径:io.netty.buffer.ByteBuf
类名称:ByteBuf
方法名:setByte
[英]Sets the specified byte at the specified absolute index in this buffer. The 24 high-order bits of the specified value are ignored. This method does not modify readerIndex or writerIndex of this buffer.
[中]在此缓冲区中指定的绝对索引处设置指定的字节。指定值的24个高位将被忽略。此方法不修改此缓冲区的readerIndex或writerIndex。
代码示例来源:origin: apache/incubator-dubbo
@Override
public void setByte(int index, int value) {
buffer.setByte(index, value);
}
代码示例来源:origin: netty/netty
@Override
public ByteBuf setByte(int index, int value) {
buf.setByte(index, value);
return this;
}
代码示例来源:origin: netty/netty
@Override
public ByteBuf setByte(int index, int value) {
buf.setByte(index, value);
return this;
}
代码示例来源:origin: redisson/redisson
@Override
public ByteBuf setByte(int index, int value) {
buf.setByte(index, value);
return this;
}
代码示例来源:origin: redisson/redisson
@Override
public ByteBuf setByte(int index, int value) {
buf.setByte(index, value);
return this;
}
代码示例来源:origin: netty/netty
@Override
public ByteBuf setByte(int index, int value) {
unwrap().setByte(index, value);
return this;
}
代码示例来源:origin: netty/netty
@Override
protected void _setByte(int index, int value) {
unwrap().setByte(index, value);
}
代码示例来源:origin: eclipse-vertx/vert.x
public Buffer setByte(int pos, byte b) {
ensureWritable(pos, 1);
buffer.setByte(pos, b);
return this;
}
代码示例来源:origin: eclipse-vertx/vert.x
public Buffer setUnsignedByte(int pos, short b) {
ensureWritable(pos, 1);
buffer.setByte(pos, b);
return this;
}
代码示例来源:origin: redisson/redisson
@Override
public ByteBuf setByte(int index, int value) {
unwrap().setByte(index, value);
return this;
}
代码示例来源:origin: redisson/redisson
@Override
protected void _setByte(int index, int value) {
unwrap().setByte(index, value);
}
代码示例来源:origin: netty/netty
@Override
public CompositeByteBuf setByte(int index, int value) {
Component c = findComponent(index);
c.buf.setByte(c.idx(index), value);
return this;
}
代码示例来源:origin: netty/netty
@Override
protected void _setByte(int index, int value) {
Component c = findComponent0(index);
c.buf.setByte(c.idx(index), value);
}
代码示例来源:origin: netty/netty
@Override
protected void _setByte(int index, int value) {
unwrap().setByte(idx(index), value);
}
代码示例来源:origin: redisson/redisson
@Override
protected void _setByte(int index, int value) {
Component c = findComponent0(index);
c.buf.setByte(c.idx(index), value);
}
代码示例来源:origin: redisson/redisson
@Override
public CompositeByteBuf setByte(int index, int value) {
Component c = findComponent(index);
c.buf.setByte(c.idx(index), value);
return this;
}
代码示例来源:origin: redisson/redisson
@Override
protected void _setByte(int index, int value) {
unwrap().setByte(idx(index), value);
}
代码示例来源:origin: netty/netty
@Override
public ByteBuf setByte(int index, int value) {
checkIndex0(index, 1);
unwrap().setByte(idx(index), value);
return this;
}
代码示例来源:origin: redisson/redisson
@Override
public ByteBuf setByte(int index, int value) {
checkIndex0(index, 1);
unwrap().setByte(idx(index), value);
return this;
}
代码示例来源:origin: netty/netty
private ChannelFuture finishEncode(final ChannelHandlerContext ctx, ChannelPromise promise) {
if (finished) {
promise.setSuccess();
return promise;
}
finished = true;
final ByteBuf footer = ctx.alloc().heapBuffer(
compressor.maxCompressedLength(buffer.readableBytes()) + HEADER_LENGTH);
flushBufferedData(footer);
final int idx = footer.writerIndex();
footer.setLong(idx, MAGIC_NUMBER);
footer.setByte(idx + TOKEN_OFFSET, (byte) (BLOCK_TYPE_NON_COMPRESSED | compressionLevel));
footer.setInt(idx + COMPRESSED_LENGTH_OFFSET, 0);
footer.setInt(idx + DECOMPRESSED_LENGTH_OFFSET, 0);
footer.setInt(idx + CHECKSUM_OFFSET, 0);
footer.writerIndex(idx + HEADER_LENGTH);
return ctx.writeAndFlush(footer, promise);
}
内容来源于网络,如有侵权,请联系作者删除!