Package com.anlavn.file
Class Raw
java.lang.Object
com.anlavn.file.Raw
The Raw class supports write and read string data to file at specific location.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidUse this method to close the file if you don't want write or read to there anymore.Use this method to get file location.readData()Use this method to read string data from file.voidUse this method to write string Data to file.
-
Constructor Details
-
Raw
public Raw()Create a default Raw File at "RawFile.txt" location. -
Raw
Create a Raw File at filePath location.- Parameters:
filePath- is specific location of Raw file, file name extension should be ".txt".
-
-
Method Details
-
getFilePath
Use this method to get file location.- Returns:
- location of Raw file.
-
closeFile
public void closeFile()Use this method to close the file if you don't want write or read to there anymore. -
writeData
Use this method to write string Data to file.- Parameters:
Data- a string data need write to file.
-
readData
Use this method to read string data from file.- Returns:
- a string data in file, return null if nothing.
-