Package anlavn.file
Class Raw
java.lang.Object
anlavn.file.Raw
The Raw class supports write and read string data to file at specific location.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Use this method to close the file if you don't want write or read to there anymore.void
Use this method to copy file to the specified directory.void
Use this method to copy file to the specified directory.Use this method to get file location.readData()
Use this method to read string data from file.void
Use this method to write string Data to file.
-
Constructor Details
-
Raw
Open 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.
-
copyTo
Use this method to copy file to the specified directory.- Parameters:
directory
- directory path will contain your file.
-
copyTo
Use this method to copy file to the specified directory.- Parameters:
directory
- directory path will contain your file.bufferNum
- number of byte buffer when copy. Default is 8192.
-