Lines 75-81
Link Here
|
75 |
|
75 |
|
76 |
@Override |
76 |
@Override |
77 |
public char[] read(String key){ |
77 |
public char[] read(String key){ |
78 |
runCommand("close", runCommand("localWallet"), "true".toCharArray() ); |
|
|
79 |
if (updateHandler()){ |
78 |
if (updateHandler()){ |
80 |
char[] pwd = runCommand("readPassword", handler, getApplicationName(), key.toCharArray(), getApplicationName(true)); |
79 |
char[] pwd = runCommand("readPassword", handler, getApplicationName(), key.toCharArray(), getApplicationName(true)); |
81 |
runCommand("close", runCommand("localWallet"), "true".toCharArray() ); |
80 |
runCommand("close", runCommand("localWallet"), "true".toCharArray() ); |
Lines 88-94
Link Here
|
88 |
public void save(String key, char[] password, String description){ |
87 |
public void save(String key, char[] password, String description){ |
89 |
//description is forgoten ! kdewallet dosen't have any facility to store |
88 |
//description is forgoten ! kdewallet dosen't have any facility to store |
90 |
//it by default and I don't want to do it by adding new fields to kwallet |
89 |
//it by default and I don't want to do it by adding new fields to kwallet |
91 |
runCommand("close", runCommand("localWallet"), "true".toCharArray() ); |
|
|
92 |
if (updateHandler()){ |
90 |
if (updateHandler()){ |
93 |
if (new String(runCommand("writePassword", handler , getApplicationName() |
91 |
if (new String(runCommand("writePassword", handler , getApplicationName() |
94 |
, key.toCharArray(), password , getApplicationName(true)) |
92 |
, key.toCharArray(), password , getApplicationName(true)) |
Lines 103-109
Link Here
|
103 |
|
101 |
|
104 |
@Override |
102 |
@Override |
105 |
public void delete(String key){ |
103 |
public void delete(String key){ |
106 |
runCommand("close", runCommand("localWallet"), "true".toCharArray() ); |
|
|
107 |
if (updateHandler()){ |
104 |
if (updateHandler()){ |
108 |
if (new String(runCommand("removeEntry" ,handler, |
105 |
if (new String(runCommand("removeEntry" ,handler, |
109 |
getApplicationName() , key.toCharArray() , getApplicationName(true) |
106 |
getApplicationName() , key.toCharArray() , getApplicationName(true) |
Lines 144-150
Link Here
|
144 |
Runtime rt = Runtime.getRuntime(); |
141 |
Runtime rt = Runtime.getRuntime(); |
145 |
String retVal = ""; |
142 |
String retVal = ""; |
146 |
try { |
143 |
try { |
147 |
|
144 |
if (logger.isLoggable(Level.FINE)) { |
|
|
145 |
logger.log(Level.FINE, "executing {0}", Arrays.toString(argv)); |
146 |
} |
148 |
Process pr = rt.exec(argv); |
147 |
Process pr = rt.exec(argv); |
149 |
|
148 |
|
150 |
BufferedReader input = new BufferedReader(new InputStreamReader(pr.getInputStream())); |
149 |
BufferedReader input = new BufferedReader(new InputStreamReader(pr.getInputStream())); |
Lines 169-178
Link Here
|
169 |
|
168 |
|
170 |
|
169 |
|
171 |
int exitVal = pr.waitFor(); |
170 |
int exitVal = pr.waitFor(); |
172 |
if(exitVal!=0){ |
171 |
if (logger.isLoggable(Level.FINE)) { |
173 |
logger.log(Level.FINE,"application exit with code "+exitVal+" for commandString: "+Arrays.toString(argv)); |
172 |
logger.log(Level.FINE, "application exit with code {0} for commandString: {1}", new Object[]{exitVal, Arrays.toString(argv)}); |
174 |
} |
173 |
} |
175 |
|
|
|
176 |
} catch (InterruptedException ex) { |
174 |
} catch (InterruptedException ex) { |
177 |
logger.log(Level.FINE, |
175 |
logger.log(Level.FINE, |
178 |
"exception thrown while invoking the command \""+Arrays.toString(argv)+"\"", |
176 |
"exception thrown while invoking the command \""+Arrays.toString(argv)+"\"", |