com.sshtools.net
Class SocketWrapper
java.lang.Object
com.sshtools.net.SocketWrapper
- All Implemented Interfaces:
- SocketTimeoutSupport, SshIO, SshTransport
- Direct Known Subclasses:
- HttpProxyTransportWrapper
public class SocketWrapper
- extends Object
- implements SshTransport, SocketTimeoutSupport
Implements a basic wrapper around a Socket to provide an SshTransport suitable for use
in making connections using the SshConnector.
- Author:
- Lee David Painter
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
socket
protected Socket socket
SocketWrapper
public SocketWrapper(Socket socket)
throws SocketException
- Create a SocketWrapper
- Parameters:
socket -
- Throws:
SocketException
getInputStream
public InputStream getInputStream()
throws IOException
- Specified by:
getInputStream in interface SshIO
- Throws:
IOException
getOutputStream
public OutputStream getOutputStream()
throws IOException
- Specified by:
getOutputStream in interface SshIO
- Throws:
IOException
getHost
public String getHost()
- Specified by:
getHost in interface SshTransport
getPort
public int getPort()
- Specified by:
getPort in interface SshTransport
close
public void close()
throws IOException
- Specified by:
close in interface SshIO
- Throws:
IOException
duplicate
public SshTransport duplicate()
throws IOException
- Specified by:
duplicate in interface SshTransport
- Throws:
IOException
setSoTimeout
public void setSoTimeout(int timeout)
throws IOException
- Specified by:
setSoTimeout in interface SocketTimeoutSupport
- Throws:
IOException
getSoTimeout
public int getSoTimeout()
throws IOException
- Specified by:
getSoTimeout in interface SocketTimeoutSupport
- Throws:
IOException
Copyright © 2012. All Rights Reserved.