|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jfw.file.SaveFile
public final class SaveFile
Save a file.
Constructor Summary | |
---|---|
SaveFile(java.lang.String fileName)
Create an instance. |
|
SaveFile(java.lang.String path,
java.lang.String fileName)
Create an instance. |
Method Summary | |
---|---|
void |
backupBinaryFile()
Create a backup copy of the file with extension returned by method. |
void |
backupTextFile()
Create a backup copy of the file with extension returned by method. |
void |
close()
Close streams used for saving the file. |
void |
finalize()
Call super and method close() . |
boolean |
isIsAppend()
Get append behaviour. |
void |
saveBinaryFile(byte[] fileContent)
Save binary file. |
void |
saveTextFile(java.lang.String fileContent)
Save text file. |
void |
setIsAppend(boolean isAppend)
Set append behaviour. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SaveFile(java.lang.String fileName)
fileName
- the name of the file with absolute path.public SaveFile(java.lang.String path, java.lang.String fileName)
path
- the path of the saved file.fileName
- the file name.Method Detail |
---|
public void saveTextFile(java.lang.String fileContent) throws JFWGenericException
fileContent
- the content of the file.
JFWGenericException
public void saveBinaryFile(byte[] fileContent) throws JFWGenericException
fileContent
- the content of the file.
JFWGenericException
public boolean isIsAppend()
public void setIsAppend(boolean isAppend)
isAppend
- true to set append behaviour, false in other case.public void backupTextFile() throws JFWGenericException
Miscellaneous.getTimeExtension()
.
JFWGenericException
public void backupBinaryFile() throws JFWGenericException
Miscellaneous.getTimeExtension()
.
JFWGenericException
public void close()
public void finalize() throws java.lang.Throwable
close()
.
finalize
in class java.lang.Object
java.lang.Throwable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |