本文整理了Java中io.netty.buffer.ByteBuf.forEachByteDesc()
方法的一些代码示例,展示了ByteBuf.forEachByteDesc()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ByteBuf.forEachByteDesc()
方法的具体详情如下:
包路径:io.netty.buffer.ByteBuf
类名称:ByteBuf
方法名:forEachByteDesc
[英]Iterates over the specified area of this buffer with the specified processor in descending order. (i.e. (index + length - 1), (index + length - 2), ... index)
[中]使用指定的处理器按降序遍历此缓冲区的指定区域。(即(指数+长度-1),(指数+长度-2)。。。索引)
代码示例来源:origin: netty/netty
@Override
public int forEachByteDesc(int index, int length, ByteProcessor processor) {
return buf.forEachByteDesc(index, length, processor);
}
代码示例来源:origin: netty/netty
@Override
public int forEachByteDesc(ByteProcessor processor) {
return buf.forEachByteDesc(processor);
}
代码示例来源:origin: netty/netty
@Override
public int forEachByteDesc(int index, int length, ByteProcessor processor) {
return buf.forEachByteDesc(index, length, processor);
}
代码示例来源:origin: netty/netty
@Override
public int forEachByteDesc(ByteProcessor processor) {
return buf.forEachByteDesc(processor);
}
代码示例来源:origin: redisson/redisson
@Override
public int forEachByteDesc(ByteProcessor processor) {
return buf.forEachByteDesc(processor);
}
代码示例来源:origin: redisson/redisson
@Override
public int forEachByteDesc(ByteProcessor processor) {
return buf.forEachByteDesc(processor);
}
代码示例来源:origin: redisson/redisson
@Override
public int forEachByteDesc(int index, int length, ByteProcessor processor) {
return buf.forEachByteDesc(index, length, processor);
}
代码示例来源:origin: netty/netty
@Override
public int forEachByteDesc(int index, int length, ByteProcessor processor) {
if (index + length > buffer.writerIndex()) {
throw REPLAY;
}
return buffer.forEachByteDesc(index, length, processor);
}
代码示例来源:origin: redisson/redisson
@Override
public int forEachByteDesc(int index, int length, ByteProcessor processor) {
if (index + length > buffer.writerIndex()) {
throw REPLAY;
}
return buffer.forEachByteDesc(index, length, processor);
}
代码示例来源:origin: spring-projects/spring-framework
@Override
public int lastIndexOf(IntPredicate predicate, int fromIndex) {
Assert.notNull(predicate, "IntPredicate must not be null");
if (fromIndex < 0) {
return -1;
}
fromIndex = Math.min(fromIndex, this.byteBuf.writerIndex() - 1);
return this.byteBuf.forEachByteDesc(0, fromIndex + 1, predicate.negate()::test);
}
代码示例来源:origin: netty/netty
@Override
public int forEachByteDesc(int index, int length, ByteProcessor processor) {
return unwrap().forEachByteDesc(index, length, processor);
}
}
代码示例来源:origin: netty/netty
@Override
public int forEachByteDesc(ByteProcessor processor) {
if (terminated) {
return buffer.forEachByteDesc(processor);
} else {
throw reject();
}
}
代码示例来源:origin: netty/netty
@Override
public int forEachByteDesc(int index, int length, ByteProcessor processor) {
return unwrap().forEachByteDesc(index, length, processor);
}
代码示例来源:origin: redisson/redisson
@Override
public int forEachByteDesc(int index, int length, ByteProcessor processor) {
return unwrap().forEachByteDesc(index, length, processor);
}
}
代码示例来源:origin: redisson/redisson
@Override
public int forEachByteDesc(ByteProcessor processor) {
if (terminated) {
return buffer.forEachByteDesc(processor);
} else {
throw reject();
}
}
代码示例来源:origin: redisson/redisson
@Override
public int forEachByteDesc(int index, int length, ByteProcessor processor) {
return unwrap().forEachByteDesc(index, length, processor);
}
代码示例来源:origin: netty/netty
private static int lastIndexOf(ByteBuf buffer, int fromIndex, int toIndex, byte value) {
int capacity = buffer.capacity();
fromIndex = Math.min(fromIndex, capacity);
if (fromIndex < 0 || capacity == 0) {
return -1;
}
return buffer.forEachByteDesc(toIndex, fromIndex - toIndex, new ByteProcessor.IndexOfProcessor(value));
}
代码示例来源:origin: redisson/redisson
private static int lastIndexOf(ByteBuf buffer, int fromIndex, int toIndex, byte value) {
int capacity = buffer.capacity();
fromIndex = Math.min(fromIndex, capacity);
if (fromIndex < 0 || capacity == 0) {
return -1;
}
return buffer.forEachByteDesc(toIndex, fromIndex - toIndex, new ByteProcessor.IndexOfProcessor(value));
}
代码示例来源:origin: netty/netty
@Override
public int forEachByteDesc(int index, int length, ByteProcessor processor) {
checkIndex0(index, length);
int ret = unwrap().forEachByteDesc(idx(index), length, processor);
if (ret >= adjustment) {
return ret - adjustment;
} else {
return -1;
}
}
代码示例来源:origin: redisson/redisson
@Override
public int forEachByteDesc(int index, int length, ByteProcessor processor) {
checkIndex0(index, length);
int ret = unwrap().forEachByteDesc(idx(index), length, processor);
if (ret >= adjustment) {
return ret - adjustment;
} else {
return -1;
}
}
内容来源于网络,如有侵权,请联系作者删除!