@Override
    public void execute(FileSearchBean task) throws Exception {
        final FileInputStream fileInputStream = new FileInputStream(task.getInputFile());
        final BufferedInputStream bufferedInputStream = new BufferedInputStream(fileInputStream, bufferSize);

        try {
            int j = 0;
            int buff;
            while ((buff = bufferedInputStream.read()) != -1 && j < patternBytes.length) {
                while (j >= 0 && buff != (patternBytes[j] & 0xff)) {
                    j = kmpNext[j];
                }
                j++;

                if (j >= patternBytes.length) {
                    resultCollector.push(task);
                    break;
                    //  j = kmpNext[j];
                }
            }
        } finally {
            try {
                bufferedInputStream.close();
            } catch (IOException ioe) { /* ignore silently */ }
            try {
                fileInputStream.close();
            } catch(IOException ioe) { /* ignore silently */ }
        }
    }