Top Description Inners Fields Constructors Methods
io.netty.buffer.search

public Class KmpSearchProcessorFactory

extends AbstractSearchProcessorFactory
Class Inheritance
Imports
io.netty.util.internal.PlatformDependent

Implements Knuth-Morris-Pratt string search algorithm. Use static AbstractSearchProcessorFactory#newKmpSearchProcessorFactory to create an instance of this factory. Use KmpSearchProcessorFactory#newSearchProcessor to get an instance of io.netty.util.ByteProcessor implementation for performing the actual search.
See Also
AbstractSearchProcessorFactory

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private final int[]
private final byte[]

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public KmpSearchProcessorFactory.Processor
Inherited from io.netty.buffer.search.AbstractSearchProcessorFactory:
newBitapSearchProcessorFactorynewKmpSearchProcessorFactory

Field Detail

jumpTableback to summary
private final int[] jumpTable
needleback to summary
private final byte[] needle

Constructor Detail

KmpSearchProcessorFactoryback to summary
pack-priv KmpSearchProcessorFactory(byte[] needle)

Method Detail

newSearchProcessorback to summary
public KmpSearchProcessorFactory.Processor newSearchProcessor()

Implements io.netty.buffer.search.SearchProcessorFactory.newSearchProcessor.

Returns a new Processor.

Annotations
@Override
io.netty.buffer.search back to summary

public Class KmpSearchProcessorFactory.Processor

extends Object
implements SearchProcessor
Class Inheritance
All Implemented Interfaces
io.netty.buffer.search.SearchProcessor, io.netty.util.ByteProcessor

Field Summary

Modifier and TypeField and Description
private long
private final int[]
private final byte[]

Constructor Summary

AccessConstructor and Description
pack-priv
Processor(byte[] needle, int[] jumpTable)

Method Summary

Modifier and TypeMethod and Description
public boolean
public void
reset()

Implements io.netty.buffer.search.SearchProcessor.reset.

Resets the state of SearchProcessor.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

currentPositionback to summary
private long currentPosition
jumpTableback to summary
private final int[] jumpTable
needleback to summary
private final byte[] needle

Constructor Detail

Processorback to summary
pack-priv Processor(byte[] needle, int[] jumpTable)

Method Detail

processback to summary
public boolean process(byte value)

Implements io.netty.util.ByteProcessor.process.

Returns:boolean

Doc from io.netty.util.ByteProcessor.process.

true if the processor wants to continue the loop and handle the next byte in the buffer. false if the processor wants to stop handling bytes and abort the loop.

Annotations
@Override
resetback to summary
public void reset()

Implements io.netty.buffer.search.SearchProcessor.reset.

Doc from io.netty.buffer.search.SearchProcessor.reset.

Resets the state of SearchProcessor.

Annotations
@Override