Class ServerUtils


  • public class ServerUtils
    extends Object
    Author:
    David Matejcek
    • Constructor Detail

      • ServerUtils

        public ServerUtils()
    • Method Detail

      • getLocalIP4Address

        public static String getLocalIP4Address()
        Returns:
        the IP address of the localhost.
      • createWar

        public static File createWar​(File warFile,
                                     Class<?>... classes)
        Creates a simple war file made of provided classes.
        Parameters:
        warFile -
        classes -
        Returns:
        file usable for deployment.
      • download

        public static String download​(URL url)
                               throws IOException
        Downloads content from the url. Expects there is a service listening and returning textual response. Therefore this is usable just for simple servlets.
        Parameters:
        url -
        Returns:
        content from the url.
        Throws:
        IOException