Class JsonReader

java.lang.Object
org.jpass.database.JsonReader

public class JsonReader extends Object
Read from password database
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor - load decrypted data in JSON format as String
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Get instance of class
    static void
    Check for last id in database - by counting the length of the JSON array Set lastId in ConfigGetter
    static void
    Read all credentials from database and print to console
    static String[]
    readSpecificIdOrUname(int id, String uname, boolean type)
    Read specific id or account name from database and print to console

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JsonReader

      public JsonReader()
      Constructor - load decrypted data in JSON format as String
  • Method Details

    • checkForLastId

      public static void checkForLastId()
      Check for last id in database - by counting the length of the JSON array Set lastId in ConfigGetter
    • readAll

      public static void readAll()
      Read all credentials from database and print to console
    • readSpecificIdOrUname

      public static String[] readSpecificIdOrUname(int id, String uname, boolean type)
      Read specific id or account name from database and print to console
      Parameters:
      id - id of the credential
      uname - account name of the credential
      type - if true, read by id, if false, read by account name
      Returns:
      String[] with username and password
    • getInstance

      public static void getInstance()
      Get instance of class