private Connection connection;
/**
- * Sets the hostname of the node. The default port for FCP2 connections (
- * {@link Node#DEFAULT_PORT}) is used.
+ * Sets the hostname of the node. The default port for FCP2 connections ({@link Node#DEFAULT_PORT})
+ * is used.
*
* @param hostname
* The hostname of the node
*/
public String[] generateKeyPair() throws IOException {
if (!isNodePresent()) {
- return null;
+ throw new IOException("Node is offline.");
}
GenerateSSK generateSSK = new GenerateSSK();
Client client = new Client(connection, generateSSK);