{"action":"created","issue":{"url":"https://api.github.com/repos/apache/nifi/issues/197","labels_url":"https://api.github.com/repos/apache/nifi/issues/197/labels{/name}","comments_url":"https://api.github.com/repos/apache/nifi/issues/197/comments","events_url":"https://api.github.com/repos/apache/nifi/issues/197/events","html_url":"https://github.com/apache/nifi/pull/197","id":130103125,"number":197,"title":"NIFI-924:Nifi-Camel Integration","user":{"login":"PuspenduBanerjee","id":5090152,"avatar_url":"https://avatars.githubusercontent.com/u/5090152?v=3","gravatar_id":"","url":"https://api.github.com/users/PuspenduBanerjee","html_url":"https://github.com/PuspenduBanerjee","followers_url":"https://api.github.com/users/PuspenduBanerjee/followers","following_url":"https://api.github.com/users/PuspenduBanerjee/following{/other_user}","gists_url":"https://api.github.com/users/PuspenduBanerjee/gists{/gist_id}","starred_url":"https://api.github.com/users/PuspenduBanerjee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PuspenduBanerjee/subscriptions","organizations_url":"https://api.github.com/users/PuspenduBanerjee/orgs","repos_url":"https://api.github.com/users/PuspenduBanerjee/repos","events_url":"https://api.github.com/users/PuspenduBanerjee/events{/privacy}","received_events_url":"https://api.github.com/users/PuspenduBanerjee/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-01-31T08:50:06Z","updated_at":"2016-02-01T23:28:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/nifi/pulls/197","html_url":"https://github.com/apache/nifi/pull/197","diff_url":"https://github.com/apache/nifi/pull/197.diff","patch_url":"https://github.com/apache/nifi/pull/197.patch"},"body":"working version of nifi-camel integration.\r\nIt Supports to load camel context from File, Classpath as well as to define and modify Routes on the fly.\r\nOverall it's an implementation of feature request NIFI-924 [https://issues.apache.org/jira/browse/NIFI-924#]\r\n\r\n\r\nSample NiFi Template: \r\n[CamelProcessorTestingTemplate.xml.zip](https://github.com/apache/nifi/files/111181/CamelProcessorTestingTemplate.xml.zip)\r\n"},"comment":{"url":"https://api.github.com/repos/apache/nifi/issues/comments/178252892","html_url":"https://github.com/apache/nifi/pull/197#issuecomment-178252892","issue_url":"https://api.github.com/repos/apache/nifi/issues/197","id":178252892,"user":{"login":"PuspenduBanerjee","id":5090152,"avatar_url":"https://avatars.githubusercontent.com/u/5090152?v=3","gravatar_id":"","url":"https://api.github.com/users/PuspenduBanerjee","html_url":"https://github.com/PuspenduBanerjee","followers_url":"https://api.github.com/users/PuspenduBanerjee/followers","following_url":"https://api.github.com/users/PuspenduBanerjee/following{/other_user}","gists_url":"https://api.github.com/users/PuspenduBanerjee/gists{/gist_id}","starred_url":"https://api.github.com/users/PuspenduBanerjee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PuspenduBanerjee/subscriptions","organizations_url":"https://api.github.com/users/PuspenduBanerjee/orgs","repos_url":"https://api.github.com/users/PuspenduBanerjee/repos","events_url":"https://api.github.com/users/PuspenduBanerjee/events{/privacy}","received_events_url":"https://api.github.com/users/PuspenduBanerjee/received_events","type":"User","site_admin":false},"created_at":"2016-02-01T23:28:27Z","updated_at":"2016-02-01T23:28:27Z","body":"@joewitt For Non-Uniform charset attached piece should work.\r\n\r\n```java\r\n/**\r\n     * @param rawBytes\r\n     * @param patternToMatch\r\n     * @return\r\n     */\r\n    private static boolean matchPattern(byte[] rawBytes , final String patternToMatch){\r\n        out.println(\"Pattern= \"+patternToMatch);\r\n        final Pattern pattern = Pattern.compile(patternToMatch);\r\n        final int patternByteLength=patternToMatch.getBytes().length;\r\n        out.println(\"PatternByteLength= \"+patternByteLength); \r\n        final int minSliceByteLength=2;\r\n        final int sliceByteLength = patternByteLength > minSliceByteLength ? patternByteLength : minSliceByteLength;\r\n        int offset = 0;\r\n        while (offset <= rawBytes.length) {\r\n            String s=new String(Arrays.copyOfRange(rawBytes, offset>patternByteLength? offset-(patternByteLength+1):0,\r\n                                                   (offset + sliceByteLength)));\r\n            out.println(\"Retrieved byte[]= \"+s);\r\n            if (pattern.matcher(s).find()) {\r\n                return true;\r\n            }\r\n            offset += sliceByteLength;\r\n        };\r\n        return false;\r\n    }\r\n```\r\n\r\nI tried with \\:\r\n```java\r\nmatchPattern(\"I♥NY♥Y♥NABCDdkk;lskiepdmclod;die;'cnjywkl;sfdsXRSHSY♥♥Y\".getBytes(), \"♥♥Y\");\r\n```"}}