Class Utility


  • public class Utility
    extends java.lang.Object
    Utility class.
    Author:
    mcayanan
    • Constructor Summary

      Constructors 
      Constructor Description
      Utility()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.xml.sax.InputSource openConnection​(java.net.URL url)  
      static java.io.InputStream openConnection​(java.net.URLConnection conn)
      Method that opens a connection.
      static void validateCounts​(int expected, int actual, java.lang.String errorMessage)  
      • Methods inherited from class java.lang.Object

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

      • Utility

        public Utility()
    • Method Detail

      • openConnection

        public static java.io.InputStream openConnection​(java.net.URLConnection conn)
                                                  throws java.io.IOException
        Method that opens a connection. Supports redirects.
        Parameters:
        conn - URL Connection
        Returns:
        input stream.
        Throws:
        java.io.IOException - If an error occurred while opening the stream.
      • openConnection

        public static org.xml.sax.InputSource openConnection​(java.net.URL url)
                                                      throws java.io.IOException
        Parameters:
        url -
        Returns:
        Throws:
        java.io.IOException