public class GroovySessionFile extends SessionFile implements groovy.lang.GroovyObject
FlowFile.KeyValidator| Modifier and Type | Field and Description |
|---|---|
private groovy.lang.MetaClass |
metaClass |
flowFile, session| Modifier | Constructor and Description |
|---|---|
protected |
GroovySessionFile(ProcessSessionWrap session,
FlowFile f) |
| Modifier and Type | Method and Description |
|---|---|
GroovySessionFile |
append(groovy.lang.Closure c)
Append the existing content of the flow file.
|
GroovySessionFile |
append(String charset,
CharSequence c)
Append the existing content of the flow file through Writer with defined charset.
|
GroovySessionFile |
append(String charset,
groovy.lang.Closure c)
Append the existing content of the flow file through Writer with defined charset.
|
GroovySessionFile |
append(String charset,
groovy.lang.Writable c)
Append the existing content of the flow file through Writer with defined charset.
|
groovy.lang.MetaClass |
getMetaClass()
GroovyObject support method
|
Object |
getProperty(String key)
alias method to getAttribute that will act in groovy as a property except for `size` and `attributes`
|
Object |
invokeMethod(String name,
Object args)
GroovyObject support method
|
void |
read(groovy.lang.Closure c)
Reads content of the flow file and closes input stream.
|
void |
read(String charset,
groovy.lang.Closure c)
Reads content of the flow file through Reader and closes the stream.
|
void |
setMetaClass(groovy.lang.MetaClass metaClass)
GroovyObject support method
|
void |
setProperty(String key,
Object value)
Calls putAttribute if value defined and removeAttribute if value is null
|
GroovySessionFile |
withInputStream(groovy.lang.Closure c) |
GroovySessionFile |
withOutputStream(groovy.lang.Closure c) |
GroovySessionFile |
withReader(String charset,
groovy.lang.Closure c) |
GroovySessionFile |
withWriter(String charset,
groovy.lang.Closure c) |
GroovySessionFile |
write(groovy.lang.Closure c)
Write or read+write flow file contents through streams.
|
GroovySessionFile |
write(String charset,
CharSequence c)
Instantly writes into flow file contents the char sequence (string).
|
GroovySessionFile |
write(String charset,
groovy.lang.Closure c)
Write flow file contents through writer with defined charset.
|
GroovySessionFile |
write(String charset,
groovy.lang.Writable c)
Write flow file contents through writer with defined charset.
|
append, clone, compareTo, getAttribute, getAttributes, getEntryDate, getId, getLastQueueDate, getLineageStartDate, getLineageStartIndex, getQueueDateIndex, getSize, isPenalized, putAllAttributes, putAttribute, read, read, remove, removeAllAttributes, removeAttribute, session, toString, transfer, write, writeprotected GroovySessionFile(ProcessSessionWrap session, FlowFile f)
public Object getProperty(String key)
getProperty in interface groovy.lang.GroovyObjectpublic void setProperty(String key, Object value)
setProperty in interface groovy.lang.GroovyObjectpublic groovy.lang.MetaClass getMetaClass()
getMetaClass in interface groovy.lang.GroovyObjectpublic void setMetaClass(groovy.lang.MetaClass metaClass)
setMetaClass in interface groovy.lang.GroovyObjectpublic Object invokeMethod(String name, Object args)
invokeMethod in interface groovy.lang.GroovyObjectpublic GroovySessionFile write(String charset, groovy.lang.Closure c)
charset - charset to use for writerc - Closure that will receive writer as a parameter to write file contentpublic GroovySessionFile write(String charset, CharSequence c)
charset - charset to use for writerc - contentpublic GroovySessionFile write(String charset, groovy.lang.Writable c)
charset - charset to use for writerc - content defined as writablepublic GroovySessionFile write(groovy.lang.Closure c)
c - Closure that could receive one parameter OutputStream to perform write,
or two parameters InputStream and OutputStream to perform read and write.public GroovySessionFile append(groovy.lang.Closure c)
c - Closure that receives one parameter OutputStream to perform append.public GroovySessionFile append(String charset, groovy.lang.Writable c)
charset - charset to use for writerc - content to append.public GroovySessionFile append(String charset, groovy.lang.Closure c)
charset - charset to use for writerc - Closure with one parameter - Writer.public GroovySessionFile append(String charset, CharSequence c)
charset - charset to use for writerc - content to append.public void read(groovy.lang.Closure c)
c - Closure with one parameter InputStream.public void read(String charset, groovy.lang.Closure c)
charset - charset to use for Readerc - Closure with one parameter Reader.public GroovySessionFile withInputStream(groovy.lang.Closure c) throws IOException
IOExceptionpublic GroovySessionFile withOutputStream(groovy.lang.Closure c) throws IOException
IOExceptionpublic GroovySessionFile withReader(String charset, groovy.lang.Closure c) throws IOException, UnsupportedCharsetException
public GroovySessionFile withWriter(String charset, groovy.lang.Closure c) throws IOException, UnsupportedCharsetException
Copyright © 2022 Apache NiFi Project. All rights reserved.