Class HttpUtil


  • public abstract class HttpUtil
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      HttpUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void download​(java.lang.String url, java.io.File file)  
      static void download​(java.lang.String url, java.io.OutputStream output)  
      static void download​(java.net.URL url, java.io.File file)  
      static void download​(java.net.URL url, java.io.OutputStream output)  
      static byte[] getBytesFromUrl​(java.lang.String urlString)  
      static byte[] getBytesFromUrl​(java.net.URL url)  
      static java.lang.String getStringFromUrl​(java.lang.String urlString)  
      • Methods inherited from class java.lang.Object

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

      • HttpUtil

        public HttpUtil()
    • Method Detail

      • getBytesFromUrl

        public static final byte[] getBytesFromUrl​(java.lang.String urlString)
                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • getBytesFromUrl

        public static final byte[] getBytesFromUrl​(java.net.URL url)
                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • getStringFromUrl

        public static final java.lang.String getStringFromUrl​(java.lang.String urlString)
                                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • download

        public static void download​(java.lang.String url,
                                    java.io.File file)
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • download

        public static void download​(java.net.URL url,
                                    java.io.File file)
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • download

        public static void download​(java.lang.String url,
                                    java.io.OutputStream output)
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • download

        public static void download​(java.net.URL url,
                                    java.io.OutputStream output)
                             throws java.io.IOException
        Throws:
        java.io.IOException