Enum Download

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      INSTANCE  
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.String DEFAULT_REMOTE_URL  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Download()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean check​(Context context)  
      static boolean checkJars​(Context context, java.lang.String name, java.lang.String zip, java.lang.String id, java.lang.String path, java.lang.String... libraries)  
      static long downloadAndUnpack​(Context context, java.lang.String file, java.io.File path)  
      private static boolean downloadLibrary​(Context context, java.lang.String name, java.lang.String path, java.io.File dependencies, Either<java.lang.String> tryMaven, java.lang.String library, java.lang.String zip)  
      static boolean downloadZip​(java.io.File dependencies, Context context, java.lang.String name, java.lang.String zip)  
      java.lang.String getAlias()  
      java.lang.String getDetailedDescription()  
      java.lang.String getShortDescription()  
      java.lang.String getUsage()  
      static boolean isDefaultUrl​(Context context)  
      static Either<java.lang.Long> lastModified​(Context context, java.lang.String file, java.lang.String name, long current)  
      private static boolean promptForAlternative​(java.io.File dependencies, Context context, java.lang.String name, java.lang.String zip)  
      static java.lang.String remoteUrl​(Context context)  
      void run​(Context context)  
      static Download valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Download[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      private static java.lang.String websiteName​(Context context)  
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • INSTANCE

        public static final Download INSTANCE
    • Field Detail

      • DEFAULT_REMOTE_URL

        private static final java.lang.String DEFAULT_REMOTE_URL
        See Also:
        Constant Field Values
    • Constructor Detail

      • Download

        private Download()
    • Method Detail

      • values

        public static Download[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Download c : Download.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Download valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • remoteUrl

        public static java.lang.String remoteUrl​(Context context)
      • isDefaultUrl

        public static boolean isDefaultUrl​(Context context)
      • websiteName

        private static java.lang.String websiteName​(Context context)
      • downloadAndUnpack

        public static long downloadAndUnpack​(Context context,
                                             java.lang.String file,
                                             java.io.File path)
                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • lastModified

        public static Either<java.lang.Long> lastModified​(Context context,
                                                          java.lang.String file,
                                                          java.lang.String name,
                                                          long current)
      • downloadZip

        public static boolean downloadZip​(java.io.File dependencies,
                                          Context context,
                                          java.lang.String name,
                                          java.lang.String zip)
      • promptForAlternative

        private static boolean promptForAlternative​(java.io.File dependencies,
                                                    Context context,
                                                    java.lang.String name,
                                                    java.lang.String zip)
                                             throws ExitException
        Throws:
        ExitException
      • checkJars

        public static boolean checkJars​(Context context,
                                        java.lang.String name,
                                        java.lang.String zip,
                                        java.lang.String id,
                                        java.lang.String path,
                                        java.lang.String... libraries)
                                 throws ExitException
        Throws:
        ExitException
      • downloadLibrary

        private static boolean downloadLibrary​(Context context,
                                               java.lang.String name,
                                               java.lang.String path,
                                               java.io.File dependencies,
                                               Either<java.lang.String> tryMaven,
                                               java.lang.String library,
                                               java.lang.String zip)
                                        throws ExitException
        Throws:
        ExitException