public static class Search.KMPAlgoInputStream
extends java.io.InputStream
| Constructor and Description |
|---|
KMPAlgoInputStream(RestoreableInputStream in,
byte[] pattern)
Creates a Knuth-Morris-Pratt algorithm input stream.
|
KMPAlgoInputStream(RestoreableInputStream in,
byte[] pattern,
int[] faultFunction) |
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
boolean |
isEndOfStreamReached() |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
public KMPAlgoInputStream(RestoreableInputStream in, byte[] pattern)
in - input stream.pattern - pattern to search as a byte array.public KMPAlgoInputStream(RestoreableInputStream in, byte[] pattern, int[] faultFunction)
public int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOExceptionpublic boolean isEndOfStreamReached()
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamjava.io.IOExceptionpublic int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOException