com.raritantechnologies.utils
Class SocketUtils

java.lang.Object
  extended bycom.raritantechnologies.utils.SocketUtils

public class SocketUtils
extends java.lang.Object

java.net.Socket utility methods (connect, read, write).


Constructor Summary
SocketUtils()
           
 
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
 

Constructor Detail

SocketUtils

public SocketUtils()
Method Detail

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)