本文整理了Java中io.netty.buffer.ByteBuf.setShortLE()
方法的一些代码示例,展示了ByteBuf.setShortLE()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ByteBuf.setShortLE()
方法的具体详情如下:
包路径:io.netty.buffer.ByteBuf
类名称:ByteBuf
方法名:setShortLE
[英]Sets the specified 16-bit short integer at the specified absolute index in this buffer with the Little Endian Byte Order. The 16 high-order bits of the specified value are ignored. This method does not modify readerIndex or writerIndex of this buffer.
[中]在此缓冲区中指定的绝对索引处设置指定的16位短整数,并使用小尾端字节顺序。指定值的16个高位将被忽略。此方法不修改此缓冲区的readerIndex或writerIndex。
代码示例来源:origin: netty/netty
@Override
public ByteBuf setShortLE(int index, int value) {
buf.setShortLE(index, value);
return this;
}
代码示例来源:origin: redisson/redisson
@Override
public ByteBuf setShortLE(int index, int value) {
buf.setShortLE(index, value);
return this;
}
代码示例来源:origin: wildfly/wildfly
@Override
public ByteBuf setShortLE(int index, int value) {
buf.setShortLE(index, value);
return this;
}
代码示例来源:origin: netty/netty
@Override
public ByteBuf setShortLE(int index, int value) {
unwrap().setShortLE(index, value);
return this;
}
代码示例来源:origin: netty/netty
@Override
protected void _setShortLE(int index, int value) {
unwrap().setShortLE(index, value);
}
代码示例来源:origin: eclipse-vertx/vert.x
public Buffer setUnsignedShortLE(int pos, int s) {
ensureWritable(pos, 2);
buffer.setShortLE(pos, s);
return this;
}
代码示例来源:origin: eclipse-vertx/vert.x
public Buffer setShortLE(int pos, short s) {
ensureWritable(pos, 2);
buffer.setShortLE(pos, s);
return this;
}
代码示例来源:origin: redisson/redisson
@Override
protected void _setShortLE(int index, int value) {
unwrap().setShortLE(index, value);
}
代码示例来源:origin: redisson/redisson
@Override
public ByteBuf setShortLE(int index, int value) {
unwrap().setShortLE(index, value);
return this;
}
代码示例来源:origin: netty/netty
/**
* Sets a big-endian 16-bit short integer to the buffer.
*/
@SuppressWarnings("deprecation")
public static ByteBuf setShortBE(ByteBuf buf, int index, int shortValue) {
return buf.order() == ByteOrder.BIG_ENDIAN? buf.setShort(index, shortValue) : buf.setShortLE(index, shortValue);
}
代码示例来源:origin: wildfly/wildfly
@Override
public ByteBuf setShortLE(int index, int value) {
unwrap().setShortLE(index, value);
return this;
}
代码示例来源:origin: wildfly/wildfly
@Override
protected void _setShortLE(int index, int value) {
unwrap().setShortLE(index, value);
}
代码示例来源:origin: netty/netty
@Override
protected void _setShortLE(int index, int value) {
unwrap().setShortLE(idx(index), value);
}
代码示例来源:origin: redisson/redisson
/**
* Sets a big-endian 16-bit short integer to the buffer.
*/
@SuppressWarnings("deprecation")
public static ByteBuf setShortBE(ByteBuf buf, int index, int shortValue) {
return buf.order() == ByteOrder.BIG_ENDIAN? buf.setShort(index, shortValue) : buf.setShortLE(index, shortValue);
}
代码示例来源:origin: redisson/redisson
@Override
protected void _setShortLE(int index, int value) {
unwrap().setShortLE(idx(index), value);
}
代码示例来源:origin: netty/netty
@Override
public ByteBuf setShortLE(int index, int value) {
checkIndex0(index, 2);
unwrap().setShortLE(idx(index), value);
return this;
}
代码示例来源:origin: redisson/redisson
@Override
public ByteBuf setShortLE(int index, int value) {
checkIndex0(index, 2);
unwrap().setShortLE(idx(index), value);
return this;
}
代码示例来源:origin: wildfly/wildfly
@Override
public ByteBuf setShortLE(int index, int value) {
checkIndex0(index, 2);
unwrap().setShortLE(idx(index), value);
return this;
}
代码示例来源:origin: netty/netty
@Override
protected void _setShortLE(int index, int value) {
Component c = findComponent0(index);
if (index + 2 <= c.endOffset) {
c.buf.setShortLE(c.idx(index), value);
} else if (order() == ByteOrder.BIG_ENDIAN) {
_setByte(index, (byte) value);
_setByte(index + 1, (byte) (value >>> 8));
} else {
_setByte(index, (byte) (value >>> 8));
_setByte(index + 1, (byte) value);
}
}
代码示例来源:origin: redisson/redisson
@Override
protected void _setShortLE(int index, int value) {
Component c = findComponent0(index);
if (index + 2 <= c.endOffset) {
c.buf.setShortLE(c.idx(index), value);
} else if (order() == ByteOrder.BIG_ENDIAN) {
_setByte(index, (byte) value);
_setByte(index + 1, (byte) (value >>> 8));
} else {
_setByte(index, (byte) (value >>> 8));
_setByte(index + 1, (byte) value);
}
}
内容来源于网络,如有侵权,请联系作者删除!