public class JFileWriter extends Object
| Constructor and Description |
|---|
JFileWriter() |
| Modifier and Type | Method and Description |
|---|---|
static void |
appendToFile(String pth,
String text)
append text to the end of a text file
|
static void |
copyFile(File source,
String target)
Copy method, using FileChannel#transferTo
NOTE: will overwrite existing files
|
static void |
copyFile(String infile,
String outfile) |
String |
readFile(String fname) |
String |
readLog(String logFname) |
void |
setData(String d) |
void |
setFileName(String f) |
void |
setPath(String p) |
boolean |
writeIt() |
boolean |
writeIt(String data,
String filename,
String path) |
void |
writeLine(String file,
String line) |
void |
writeLogToFile(String fname,
JTextArea jta) |
static void |
writeToFile(InputStream is,
File file)
write the inputstream contents to file
|
public void setPath(String p)
public void setFileName(String f)
public void setData(String d)
public static final void appendToFile(String pth, String text)
public static void writeToFile(InputStream is, File file) throws IOException
is - file - IOExceptionpublic boolean writeIt()
public static void copyFile(String infile, String outfile) throws FileNotFoundException, IOException
FileNotFoundExceptionIOExceptionpublic static void copyFile(File source, String target) throws FileNotFoundException, IOException
File - sourceFile - targetIOExceptionFileNotFoundExceptionCopyright © 2002–2019 Starter Inc.. All rights reserved.