public class GPGConnection extends Object
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.xoxa.gpg.ReaderProcessor)
.
Modifier and Type | Class and Description |
---|---|
static interface |
GPGConnection.Result<T>
Represents the result of an interaction with GPG
|
Constructor and Description |
---|
GPGConnection()
Create a new GPGConnection, using the default keychain.
|
GPGConnection(File home)
Create a new GPGConnection with the gpg home in the given directory.
|
Modifier and Type | Method and Description |
---|---|
boolean |
completedOK() |
String |
getStderr()
Retrieve any error information from the process.
|
protected void |
run(String[] arguments,
String input,
uk.me.nxg.xoxa.gpg.ReaderProcessor outProcessor) |
protected void |
run(String[] arguments,
String input,
uk.me.nxg.xoxa.gpg.ReaderProcessor outProcessor,
uk.me.nxg.xoxa.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
|
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)protected void run(String[] arguments, String input, uk.me.nxg.xoxa.gpg.ReaderProcessor outProcessor)
public String getStderr()
protected void setStderr(String s)
protected void run(String[] arguments, String input, uk.me.nxg.xoxa.gpg.ReaderProcessor outProcessor, uk.me.nxg.xoxa.gpg.ReaderProcessor errProcessor)
ReaderProcessor
objects. The input
string is sent to the command as soon as it starts.public boolean completedOK()
public boolean waitFor()
Copyright © 2014. All rights reserved.