nifi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (NIFI-924) Add Camel support in NiFi
Date Mon, 01 Feb 2016 23:28:39 GMT

    [ https://issues.apache.org/jira/browse/NIFI-924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15127245#comment-15127245
] 

ASF GitHub Bot commented on NIFI-924:
-------------------------------------

Github user PuspenduBanerjee commented on the pull request:

    https://github.com/apache/nifi/pull/197#issuecomment-178252892
  
    @joewitt For Non-Uniform charset attached piece should work.
    
    ```java
    /**
         * @param rawBytes
         * @param patternToMatch
         * @return
         */
        private static boolean matchPattern(byte[] rawBytes , final String patternToMatch){
            out.println("Pattern= "+patternToMatch);
            final Pattern pattern = Pattern.compile(patternToMatch);
            final int patternByteLength=patternToMatch.getBytes().length;
            out.println("PatternByteLength= "+patternByteLength); 
            final int minSliceByteLength=2;
            final int sliceByteLength = patternByteLength > minSliceByteLength ? patternByteLength
: minSliceByteLength;
            int offset = 0;
            while (offset <= rawBytes.length) {
                String s=new String(Arrays.copyOfRange(rawBytes, offset>patternByteLength?
offset-(patternByteLength+1):0,
                                                       (offset + sliceByteLength)));
                out.println("Retrieved byte[]= "+s);
                if (pattern.matcher(s).find()) {
                    return true;
                }
                offset += sliceByteLength;
            };
            return false;
        }
    ```
    
    I tried with \:
    ```java
    matchPattern("I♥NY♥Y♥NABCDdkk;lskiepdmclod;die;'cnjywkl;sfdsXRSHSY♥♥Y".getBytes(),
"♥♥Y");
    ```


> Add Camel support in NiFi
> -------------------------
>
>                 Key: NIFI-924
>                 URL: https://issues.apache.org/jira/browse/NIFI-924
>             Project: Apache NiFi
>          Issue Type: New Feature
>            Reporter: Jean-Baptiste Onofré
>
> I'm working on a NiFi Route able to leverage a Camel route (runtime routing), and another
one being able to bootstrap a Camel route starting from Camel DSLs.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message