|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xfp.AttributeContainer org.xfp.Filter org.xfp.filters.file.FileWriter
Writes input data to a File.
Nested Class Summary |
Nested classes inherited from class org.xfp.Filter |
Filter.OnErrorEnum, Filter.OnLoopErrorEnum |
Field Summary |
Fields inherited from class org.xfp.AttributeContainer |
name, parentContainer |
Constructor Summary | |
FileWriter()
|
Method Summary | |
java.io.File |
execute(byte[] bytes)
Executes this filter. |
java.io.File |
execute(java.io.InputStream inputstream)
Executes this filter. |
java.io.File |
execute(java.lang.String string)
Executes this filter. |
void |
reset()
Resets filter status after execution. |
void |
setAppend(boolean append)
Sets the append write mode. |
void |
setEncoding(java.lang.String encoding)
Sets the character encoding. |
void |
setFilename(java.lang.String filename)
Sets the name of the file to write to. |
void |
setMkdirs(boolean mkdirs)
If set to true, the filter will create the parent directory of the filename, including any necessary but nonexistent parent directories. |
void |
setOverwrite(boolean overwrite)
Sets the wheter to overwrite an existing file. |
Methods inherited from class org.xfp.Filter |
getOnError, initialize, log, newInstance, perform, toString |
Methods inherited from class org.xfp.AttributeContainer |
configureAttributes, disposeAttributes, getAttributes, getFullName, getName, initializeAttributes |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public FileWriter()
Method Detail |
public void setFilename(java.lang.String filename)
filename
- The name of the filepublic void setMkdirs(boolean mkdirs)
public void setEncoding(java.lang.String encoding)
encoding
- The name of a supported Charset
public void setAppend(boolean append)
append
- if true, then bytes will be written to the end of the file rather than the beginningpublic java.io.File execute(java.lang.String string) throws java.lang.Exception
string
- The String data to write
java.lang.Exception
public java.io.File execute(java.io.InputStream inputstream) throws java.lang.Exception
java.lang.Exception
public java.io.File execute(byte[] bytes) throws java.lang.Exception
java.lang.Exception
public void reset()
Filter
reset
in class Filter
Filter.reset()
public void setOverwrite(boolean overwrite)
overwrite
- boolean indicating wheter to overwrite files.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |