com.raritantechnologies.utils
Class SocketUtils
java.lang.Object
com.raritantechnologies.utils.SocketUtils
- public class SocketUtils
- extends java.lang.Object
java.net.Socket utility methods (connect, read, write).
|
Method Summary |
static java.net.Socket |
connectToSocket(java.lang.String hostAddress,
int hostPort)
|
static java.io.BufferedReader |
getReader(java.net.Socket socket)
|
static java.io.PrintWriter |
getWriter(java.net.Socket socket)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SocketUtils
public SocketUtils()
getReader
public static java.io.BufferedReader getReader(java.net.Socket socket)
throws java.io.IOException
- Throws:
java.io.IOException
getWriter
public static java.io.PrintWriter getWriter(java.net.Socket socket)
throws java.io.IOException
- Throws:
java.io.IOException
connectToSocket
public static java.net.Socket connectToSocket(java.lang.String hostAddress,
int hostPort)