Package anlavn.file

Class ObjectData

java.lang.Object
anlavn.file.ObjectData

public class ObjectData extends Object
The ObjectData class supports write and read object data to file at specific location.
Make sure your object class was "implements Serializable".
  • Constructor Details

    • ObjectData

      public ObjectData()
  • Method Details

    • writeData

      public static final void writeData(String filePath, Object Data)
      Use this method to write object Data to file at filePath location.
      Parameters:
      filePath - specific location of file, file name extension should be ".dat".
      Data - a object data need write to file.
    • readData

      public static final Object readData(String filePath)
      Use this method to read object data from file at filePath location.
      Parameters:
      filePath - specific location of file.
      Returns:
      a object data in file.