Class AbstractStringAwareBufProcessor
- java.lang.Object
-
- com.couchbase.client.core.endpoint.util.AbstractStringAwareBufProcessor
-
- Direct Known Subclasses:
ClosingPositionBufProcessor
,SplitPositionBufProcessor
public abstract class AbstractStringAwareBufProcessor extends Object
Base class forByteBufProcessor
that need to take JSON string escaping into account, through theisEscaped(byte)
method.- Since:
- 1.3
- Author:
- Simon Baslé
-
-
Constructor Summary
Constructors Constructor Description AbstractStringAwareBufProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
isEscaped(byte nextByte)
Detects opening and closing of JSON strings and keep track of it in order to mark characters in the string (delimiter quotes included) as escaped.
-
-
-
Method Detail
-
isEscaped
protected boolean isEscaped(byte nextByte)
Detects opening and closing of JSON strings and keep track of it in order to mark characters in the string (delimiter quotes included) as escaped. Quotes escaped by a \ are correctly detected and do not mark a closing of a JSON string.- Parameters:
nextByte
- the next byte to inspect.- Returns:
- true if the byte should be ignored as part of a JSON string, false otherwise.
-
-