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

ASF subversion and git services commented on NIFI-6145:
-------------------------------------------------------

Commit 7d02ab1e2fc9a5a424b3cfe9cd4a872f5c5c97ae in nifi's branch 
refs/heads/master from Matt Burgess
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=7d02ab1 ]

NIFI-6145: Add Groovy file idioms (withInput/OutputStream, withReader/Writer) 
to ExecuteGroovyScript

This closes #3415

Signed-off-by: Mike Thomsen <[email protected]>


> Make groovy File functions available for FlowFile to simplify scripting
> -----------------------------------------------------------------------
>
>                 Key: NIFI-6145
>                 URL: https://issues.apache.org/jira/browse/NIFI-6145
>             Project: Apache NiFi
>          Issue Type: New Feature
>            Reporter: Dmitry Lukyanov
>            Assignee: Matt Burgess
>            Priority: Minor
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> I'd like to add groovy File functions to a FlowFile class insige groovy 
> script to make work with flowfie streams similar like we work with File in 
> groovy.
> Object withInputStream(Closure closure)
> Create a new InputStream for this file and passes it into the closure.
>  Object       withOutputStream(Closure closure)
> Creates a new OutputStream for this file and passes it into the closure. 
>  Object       withReader(String charset, Closure closure)
> Create a new BufferedReader for this file using the specified charset and 
> then passes it into the closure, ensuring the reader is closed after the 
> closure returns. 
>  Object       withWriter(String charset, Closure closure)
> Creates a new BufferedWriter for this file, passes it to the closure, and 
> ensures the stream is flushed and closed after the closure returns. 
> etc...
> ----
> ready to contribute



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to