Util
Class Util

java.lang.Object
  |
  +--Util.Util

public final class Util
extends java.lang.Object

Network static utility functions


Constructor Summary
Util()
           
 
Method Summary
static void printFormattedSocketName(java.net.Socket s)
          Print a formatted description of a given socket
static java.lang.String recvLine(java.io.BufferedReader read)
          Read a line from BufferedReader 'read'
static void sendLine(java.lang.String s, java.io.BufferedWriter write)
          Sends a single line over the network.
static void waitFor(java.lang.Object o)
          Wait for a given object
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

printFormattedSocketName

public static void printFormattedSocketName(java.net.Socket s)
Print a formatted description of a given socket
Parameters:
s - The given socket

recvLine

public static java.lang.String recvLine(java.io.BufferedReader read)
Read a line from BufferedReader 'read'
Returns:
The line read

sendLine

public static void sendLine(java.lang.String s,
                            java.io.BufferedWriter write)
Sends a single line over the network. The method writes the string s, writes a newline, and flushes the output stream.
Parameters:
s - The line to send

waitFor

public static void waitFor(java.lang.Object o)
Wait for a given object
Parameters:
o - The object to wait for