|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.me.nxg.enormity.gpg.GPGConnection
public class GPGConnection
Manages a connection to a GPG executable.
This class is designed to be extended. To use, create a new
instance, and call run(java.lang.String[], java.lang.String, uk.me.nxg.enormity.gpg.ReaderProcessor)
.
Nested Class Summary | |
---|---|
static interface |
GPGConnection.Result<T>
Represents the result of an interaction with GPG |
Constructor Summary | |
---|---|
GPGConnection()
Create a new GPGConnection, using the default keychain. |
|
GPGConnection(File home)
Create a new GPGConnection with the gpg home in the given directory. |
Method Summary | |
---|---|
boolean |
completedOK()
|
String |
getStderr()
Retrieve any error information from the process. |
protected void |
run(String[] arguments,
String input,
uk.me.nxg.enormity.gpg.ReaderProcessor outProcessor)
|
protected void |
run(String[] arguments,
String input,
uk.me.nxg.enormity.gpg.ReaderProcessor outProcessor,
uk.me.nxg.enormity.gpg.ReaderProcessor errProcessor)
Runs the GPG command with the given arguments. |
protected void |
setStderr(String s)
|
boolean |
waitFor()
Waits for the process to complete, and indicates its success |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GPGConnection()
gpg
or else the value of
the gpg.binary
system property.
public GPGConnection(File home)
The gpg binary is obtained from the system property
gpg.binary
, or /usr/bin/gpg
if that
property isn't defined.
home
- the location of the pubring.gpg
to be
used (or null for default)Method Detail |
---|
protected void run(String[] arguments, String input, uk.me.nxg.enormity.gpg.ReaderProcessor outProcessor)
public String getStderr()
protected void setStderr(String s)
protected void run(String[] arguments, String input, uk.me.nxg.enormity.gpg.ReaderProcessor outProcessor, uk.me.nxg.enormity.gpg.ReaderProcessor errProcessor)
ReaderProcessor
objects. The input
string is sent to the command as soon as it starts.
public boolean completedOK()
public boolean waitFor()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |