Class StringClosingPositionBufProcessor
- java.lang.Object
-
- com.couchbase.client.core.endpoint.util.StringClosingPositionBufProcessor
-
- All Implemented Interfaces:
ByteBufProcessor
,ByteProcessor
public class StringClosingPositionBufProcessor extends Object implements ByteBufProcessor
AByteBufProcessor
to find the closing position of a JSON string. Applying this to a buffer will output the position of the closing of the string, relative to that buffer's readerIndex, or -1 if the end of the section couldn't be found. It'll take into account the string's opening quote (which is expected to be after the current readerIndex), and ignore escaped quotes inside the string. It is invoked on aByteBuf
by callingio.netty.buffer.ByteBuf#forEachByte(io.netty.buffer.ByteBufProcessor)
methods. *- Since:
- 1.1
- Author:
- Simon Baslé
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.netty.util.ByteProcessor
ByteProcessor.IndexNotOfProcessor, ByteProcessor.IndexOfProcessor
-
-
Field Summary
-
Fields inherited from interface io.netty.buffer.ByteBufProcessor
FIND_CR, FIND_CRLF, FIND_LF, FIND_LINEAR_WHITESPACE, FIND_NON_CR, FIND_NON_CRLF, FIND_NON_LF, FIND_NON_LINEAR_WHITESPACE, FIND_NON_NUL, FIND_NUL
-
Fields inherited from interface io.netty.util.ByteProcessor
FIND_ASCII_SPACE, FIND_COMMA, FIND_SEMI_COLON
-
-
Constructor Summary
Constructors Constructor Description StringClosingPositionBufProcessor()
-
-
-
Method Detail
-
process
public boolean process(byte value) throws Exception
- Specified by:
process
in interfaceByteProcessor
- Throws:
Exception
-
-