Package org.jpass.database
Class JsonReader
java.lang.Object
org.jpass.database.JsonReader
Read from password database
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Get instance of classstatic void
Check for last id in database - by counting the length of the JSON array Set lastId in ConfigGetterstatic void
readAll()
Read all credentials from database and print to consolestatic String[]
readSpecificIdOrUname
(int id, String uname, boolean type) Read specific id or account name from database and print to console
-
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
Read specific id or account name from database and print to console- Parameters:
id
- id of the credentialuname
- account name of the credentialtype
- 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
-