Class Raw

java.lang.Object
com.anlavn.file.Raw

public class Raw extends Object
The Raw class supports write and read string data to file at specific location.
  • Constructor Details

    • Raw

      public Raw()
      Create a default Raw File at "RawFile.txt" location.
    • Raw

      public Raw(String filePath)
      Create a Raw File at filePath location.
      Parameters:
      filePath - is specific location of Raw file, file name extension should be ".txt".
  • Method Details

    • getFilePath

      public String 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

      public void writeData(String Data)
      Use this method to write string Data to file.
      Parameters:
      Data - a string data need write to file.
    • readData

      public String readData()
      Use this method to read string data from file.
      Returns:
      a string data in file, return null if nothing.