Class CloseUtil

    • Method Detail

      • closeQuietly

        public static void closeQuietly​(Closeable closeable)
        Closes a closeable while suppressing any IOException that occurs.
        Parameters:
        closeable - the socket to close
      • closeQuietly

        public static void closeQuietly​(Socket socket)
        Closes a socket while suppressing any IOException that occurs.
        Parameters:
        socket - the socket to close
      • closeQuietly

        public static void closeQuietly​(ServerSocket serverSocket)
        Closes a server socket while suppressing any IOException that occurs.
        Parameters:
        serverSocket - the socket to close