private final void loadRSAKeys() {
        try {
            // try to load server info from resource file:
            File f;
            URL url;

            url = fSecurityManager.class.getResource("/tinboa/fileserver/.fkeystore");
            // if the resournce doesn't exist:
            if (url == null) {
                url = fSecurityManager.class.getResource("/tinboa/fileserver/");
                f = new File(url.getPath() + ".fkeystore");
                makeRSAKeys(f); //create or overwrite a file
            } else {
                f = new File(url.getFile());
                FileInputStream fis = new FileInputStream(f);
                if(fis.available() > 0) {
                    ObjectInputStream ois = new ObjectInputStream(fis);
                    RSAKeyPair = (KeyPair)ois.readObject();
                    ois.close();
                }
                fis.close();
            }
        } catch (Exception e) {
            System.err.println(e);
            e.printStackTrace();
        }
    }