| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
exchangeText(java.lang.String server,
int port,
java.lang.String text)
Exchange request text with the given TCP ported address.
|
static boolean |
isPortAvailable(int port)
Tests to see if a TCP port is open and available - generally a good indication that
a service is not currently running.
|
public static java.lang.String exchangeText(java.lang.String server,
int port,
java.lang.String text)
throws java.io.IOException
Returns any reply text sent back by the server. This is a single exchange - socket is opened, request text is sent and flushed, reply text is received, socket is closed, reply text is returned.
java.io.IOExceptionpublic static boolean isPortAvailable(int port)