Package com.hierynomus.sshj.backport
Class Sockets
- java.lang.Object
-
- com.hierynomus.sshj.backport.Sockets
-
public class Sockets extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Sockets()
-
Method Summary
Modifier and Type Method Description static java.io.Closeable
asCloseable(java.net.Socket socket)
Java 7 and up have Socket implemented as Closeable, whereas Java6 did not have this inheritance.
-
-
-
Method Detail
-
asCloseable
public static java.io.Closeable asCloseable(java.net.Socket socket)
Java 7 and up have Socket implemented as Closeable, whereas Java6 did not have this inheritance.- Parameters:
socket
- The socket to wrap as Closeable- Returns:
- The (potentially wrapped) Socket as a Closeable.
-
-