Save This Page
Home » openjdk-7 » sun » net » [javadoc | source]
sun.net
public class: NetworkClient [javadoc | source]
java.lang.Object
   sun.net.NetworkClient

Direct Known Subclasses:
    HttpsClient, FtpClient, GopherClient, TransferProtocolClient, HttpClient, SmtpClient

This is the base class for network clients.
Field Summary
protected  Proxy proxy     
protected  Socket serverSocket    Socket for communicating with server. 
public  PrintStream serverOutput    Stream for printing to the server. 
public  InputStream serverInput    Buffered stream for reading replies from server. 
protected static  int defaultSoTimeout     
protected static  int defaultConnectTimeout     
protected  int readTimeout     
protected  int connectTimeout     
protected static  String encoding     
Constructor:
 public NetworkClient() 
 public NetworkClient(String host,
    int port) throws IOException 
    Create connection with host host on port port
Method from sun.net.NetworkClient Summary:
closeServer,   doConnect,   getConnectTimeout,   getLocalAddress,   getReadTimeout,   openServer,   serverIsOpen,   setConnectTimeout,   setReadTimeout
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from sun.net.NetworkClient Detail:
 public  void closeServer() throws IOException 
    Close an open connection to the server.
 protected Socket doConnect(String server,
    int port) throws UnknownHostException, IOException 
    Return a socket connected to the server, with any appropriate options pre-established
 public int getConnectTimeout() 
 protected InetAddress getLocalAddress() throws IOException 
 public int getReadTimeout() 
 public  void openServer(String server,
    int port) throws UnknownHostException, IOException 
    Open a connection to the server.
 public boolean serverIsOpen() 
    Return server connection status
 public  void setConnectTimeout(int timeout) 
 public  void setReadTimeout(int timeout)