public class PlainTextFileWriter extends Object implements Runnable
PlainTextFileWriter(File, String, String).| Modifier and Type | Field and Description |
|---|---|
private String |
content |
private String |
encoding |
private File |
file |
private static org.apache.log4j.Logger |
logger |
| Constructor and Description |
|---|
PlainTextFileWriter(File file,
String content)
Create a new writer for a given file with the specified content.
|
PlainTextFileWriter(File file,
String content,
String encoding)
Create a new writer for a given file with the specified content and
encoding.
|
| Modifier and Type | Method and Description |
|---|---|
void |
run() |
void |
write()
Performs the actual writing of the content.
|
private static final org.apache.log4j.Logger logger
private File file
private String content
private String encoding
public PlainTextFileWriter(File file, String content)
file - content - public PlainTextFileWriter(File file, String content, String encoding)
file - the destination filecontent - the contentencoding - specify the encoding string, if null is passed,
UTF-8 is assumedpublic void write()
throws IOException
IOExceptionCopyright © 2009–2017 Helmut Ahammer, Philipp Kainz. All rights reserved.