Add overloaded signal(..) method to accept an arbitrary Object value to send to the server.

This commit is contained in:
John Blum
2021-09-10 10:44:19 -07:00
parent bc1fcd6cd1
commit 8f31eb4f1b

View File

@@ -220,12 +220,16 @@ public class ProcessWrapper {
}
public void signal() {
signal("\n");
}
public void signal(Object value) {
try {
OutputStream outputStream = this.process.getOutputStream();
outputStream.write("\n".getBytes());
outputStream.write(String.valueOf(value).getBytes());
outputStream.flush();
}
catch (IOException cause) {
@@ -238,7 +242,6 @@ public class ProcessWrapper {
}
}
/* (non-Javadoc) */
public void signalStop() {
try {