Class 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Sockets

        public Sockets()
    • 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.