Package util.io
Class TextFileWriter
java.lang.Object
util.io.TextFileWriter
- All Implemented Interfaces:
java.io.Serializable
public class TextFileWriter
extends java.lang.Object
implements java.io.Serializable
- Author:
- JIBOYE OLuwagbemiro Olaoluwa
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description TextFileWriter(java.lang.String filePath) -
Method Summary
Modifier and Type Method Description java.lang.StringgetFilePath()static voidmain(java.lang.String[] args)voidsetFilePath(java.lang.String filePath)voidwrite(java.lang.Object obj)Writes object data to the filestatic voidwriteText(java.io.File file, java.lang.String text)Writes object data to the fileMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
TextFileWriter
public TextFileWriter(java.lang.String filePath)
-
-
Method Details
-
write
public void write(java.lang.Object obj)Writes object data to the file- Parameters:
obj- The data to be written.
-
writeText
public static void writeText(java.io.File file, java.lang.String text)Writes object data to the file- Parameters:
file- The filetext- The data to be written.
-
getFilePath
public java.lang.String getFilePath() -
setFilePath
public void setFilePath(java.lang.String filePath) -
main
public static void main(java.lang.String[] args)
-