|
@ -1,4 +1,6 @@ |
|
|
|
|
|
import java.io.FileInputStream; |
|
|
import java.io.FileOutputStream; |
|
|
import java.io.FileOutputStream; |
|
|
|
|
|
import java.io.ObjectInputStream; |
|
|
import java.io.ObjectOutputStream; |
|
|
import java.io.ObjectOutputStream; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@ -148,6 +150,28 @@ public class CredentialRepository implements CredentialRepositoryInterface{ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Function to load serialized Objects from hard drive by path |
|
|
|
|
|
* @param fileName |
|
|
|
|
|
*/ |
|
|
|
|
|
public void deserializeObjects(String fileName) |
|
|
|
|
|
{ |
|
|
|
|
|
if(fileName.equals("")) return; |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
FileInputStream file = new FileInputStream(this.getWorkingDirectory() + fileName + ".claud11"); |
|
|
|
|
|
ObjectInputStream in = new ObjectInputStream(file); |
|
|
|
|
|
|
|
|
|
|
|
this.credentials = (CredentialList)in.readObject(); |
|
|
|
|
|
|
|
|
|
|
|
in.close(); |
|
|
|
|
|
file.close(); |
|
|
|
|
|
|
|
|
|
|
|
} catch(Exception fail) |
|
|
|
|
|
{ |
|
|
|
|
|
System.err.println("Loading of CredentialRepository failed"); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* helper function to check list size after insertion / deletion |
|
|
* helper function to check list size after insertion / deletion |
|
|