Package org.jboss.netty.buffer
Interface ChannelBufferIndexFinder
-
public interface ChannelBufferIndexFinderLocates an index of data in aChannelBuffer.This interface enables the sequential search for the data which meets more complex and dynamic condition than just a simple value matching. Please refer to
ChannelBuffer.indexOf(int, int, ChannelBufferIndexFinder)andChannelBuffer.bytesBefore(int, int, ChannelBufferIndexFinder)for more explanation.
-
-
Field Summary
Fields Modifier and Type Field Description static ChannelBufferIndexFinderCRIndex finder which locates aCR ('\r')byte.static ChannelBufferIndexFinderCRLFIndex finder which locates aCR ('\r')orLF ('\n').static ChannelBufferIndexFinderLFIndex finder which locates aLF ('\n')byte.static ChannelBufferIndexFinderLINEAR_WHITESPACEIndex finder which locates a linear whitespace (' 'and'\t').static ChannelBufferIndexFinderNOT_CRIndex finder which locates a non-CR ('\r')byte.static ChannelBufferIndexFinderNOT_CRLFIndex finder which locates a byte which is neither aCR ('\r')nor aLF ('\n').static ChannelBufferIndexFinderNOT_LFIndex finder which locates a non-LF ('\n')byte.static ChannelBufferIndexFinderNOT_LINEAR_WHITESPACEIndex finder which locates a byte which is not a linear whitespace (neither' 'nor'\t').static ChannelBufferIndexFinderNOT_NULIndex finder which locates a non-NUL (0x00)byte.static ChannelBufferIndexFinderNULIndex finder which locates aNUL (0x00)byte.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanfind(ChannelBuffer buffer, int guessedIndex)Returnstrueif and only if the data is found at the specifiedguessedIndexof the specifiedbuffer.
-
-
-
Field Detail
-
NUL
static final ChannelBufferIndexFinder NUL
Index finder which locates aNUL (0x00)byte.
-
NOT_NUL
static final ChannelBufferIndexFinder NOT_NUL
Index finder which locates a non-NUL (0x00)byte.
-
CR
static final ChannelBufferIndexFinder CR
Index finder which locates aCR ('\r')byte.
-
NOT_CR
static final ChannelBufferIndexFinder NOT_CR
Index finder which locates a non-CR ('\r')byte.
-
LF
static final ChannelBufferIndexFinder LF
Index finder which locates aLF ('\n')byte.
-
NOT_LF
static final ChannelBufferIndexFinder NOT_LF
Index finder which locates a non-LF ('\n')byte.
-
CRLF
static final ChannelBufferIndexFinder CRLF
Index finder which locates aCR ('\r')orLF ('\n').
-
NOT_CRLF
static final ChannelBufferIndexFinder NOT_CRLF
Index finder which locates a byte which is neither aCR ('\r')nor aLF ('\n').
-
LINEAR_WHITESPACE
static final ChannelBufferIndexFinder LINEAR_WHITESPACE
Index finder which locates a linear whitespace (' 'and'\t').
-
NOT_LINEAR_WHITESPACE
static final ChannelBufferIndexFinder NOT_LINEAR_WHITESPACE
Index finder which locates a byte which is not a linear whitespace (neither' 'nor'\t').
-
-
Method Detail
-
find
boolean find(ChannelBuffer buffer, int guessedIndex)
Returnstrueif and only if the data is found at the specifiedguessedIndexof the specifiedbuffer.The implementation should not perform an operation which raises an exception such as
IndexOutOfBoundsExceptionnor perform an operation which modifies the content of the buffer.
-
-