List of usage examples for io.netty.buffer ByteBufProcessor FIND_LF
ByteBufProcessor FIND_LF
To view the source code for io.netty.buffer ByteBufProcessor FIND_LF.
Click Source Link
From source file:tonivade.redis.protocol.RedisDecoder.java
License:Open Source License
private static int findEndOfLine(final ByteBuf buffer) { int i = buffer.forEachByte(ByteBufProcessor.FIND_LF); if (i > 0 && buffer.getByte(i - 1) == '\r') { i--;//from w ww . j a v a 2 s . c om } return i; }