home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / VPage / Java.bin / CLASSES.ZIP / sun / rmi / transport / proxy / WrappedSocket.class (.txt) < prev   
Encoding:
Java Class File  |  1997-07-08  |  2.0 KB  |  88 lines

  1. package sun.rmi.transport.proxy;
  2.  
  3. import java.io.IOException;
  4. import java.io.InputStream;
  5. import java.io.OutputStream;
  6. import java.net.InetAddress;
  7. import java.net.Socket;
  8. import java.net.SocketException;
  9. import java.net.SocketImpl;
  10.  
  11. class WrappedSocket extends Socket {
  12.    protected Socket socket;
  13.    // $FF: renamed from: in java.io.InputStream
  14.    protected InputStream field_0;
  15.    protected OutputStream out;
  16.  
  17.    public WrappedSocket(Socket var1, InputStream var2, OutputStream var3) throws IOException {
  18.       super((SocketImpl)null);
  19.       this.socket = var1;
  20.       this.field_0 = var2;
  21.       this.out = var3;
  22.    }
  23.  
  24.    public InetAddress getInetAddress() {
  25.       return this.socket.getInetAddress();
  26.    }
  27.  
  28.    public InetAddress getLocalAddress() {
  29.       return this.socket.getLocalAddress();
  30.    }
  31.  
  32.    public int getPort() {
  33.       return this.socket.getPort();
  34.    }
  35.  
  36.    public int getLocalPort() {
  37.       return this.socket.getLocalPort();
  38.    }
  39.  
  40.    public InputStream getInputStream() throws IOException {
  41.       if (this.field_0 == null) {
  42.          this.field_0 = this.socket.getInputStream();
  43.       }
  44.  
  45.       return this.field_0;
  46.    }
  47.  
  48.    public OutputStream getOutputStream() throws IOException {
  49.       if (this.out == null) {
  50.          this.out = this.socket.getOutputStream();
  51.       }
  52.  
  53.       return this.out;
  54.    }
  55.  
  56.    public void setTcpNoDelay(boolean var1) throws SocketException {
  57.       this.socket.setTcpNoDelay(var1);
  58.    }
  59.  
  60.    public boolean getTcpNoDelay() throws SocketException {
  61.       return this.socket.getTcpNoDelay();
  62.    }
  63.  
  64.    public void setSoLinger(boolean var1, int var2) throws SocketException {
  65.       this.socket.setSoLinger(var1, var2);
  66.    }
  67.  
  68.    public int getSoLinger() throws SocketException {
  69.       return this.socket.getSoLinger();
  70.    }
  71.  
  72.    public synchronized void setSoTimeout(int var1) throws SocketException {
  73.       this.socket.setSoTimeout(var1);
  74.    }
  75.  
  76.    public synchronized int getSoTimeout() throws SocketException {
  77.       return this.socket.getSoTimeout();
  78.    }
  79.  
  80.    public synchronized void close() throws IOException {
  81.       this.socket.close();
  82.    }
  83.  
  84.    public String toString() {
  85.       return "Wrapped" + this.socket.toString();
  86.    }
  87. }
  88.