Package com.inductiveautomation.rm.base
Class RMURLUtils
- java.lang.Object
-
- com.inductiveautomation.rm.base.RMURLUtils
-
public class RMURLUtils extends java.lang.Object
Utilities for URL.
-
-
Constructor Summary
Constructors Constructor Description RMURLUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]
getBytes(java.net.URL aURL)
Returns bytes for url.static java.io.File
getFile(java.net.URL aURL)
Returns the URL as a file.static java.io.File
getLocalFile(java.net.URL aURL)
Returns the given URL as a file (downloading to temp dir, if necessary).static java.io.File
getLocalFile(java.net.URL aURL, java.io.File aFile)
Returns the given URL as given file by downloading it.static java.io.File
getLocalFileDestination(java.net.URL aURL, java.io.File aFile)
Returns the destination file that the given URL would be saved to using the getLocalFile method.static java.lang.String
getRedirectString(java.lang.String aURLString)
Returns a redirect string.static java.net.URI
getURI(java.net.URL aURL)
Returns a URL for given string.static boolean
isLocal(java.net.URL aURL)
Returns whether a URL is local.static void
openURL(java.lang.String aURL)
Tries to open the given URL with the platform reader.static java.lang.Exception
sendCGIEmail(java.lang.String aURLString, java.util.Map aMap)
Send CGI Email.static java.lang.Exception
sendCGIEmail(java.net.URL aURL, java.util.Map aMap)
Send CGI Email.
-
-
-
Method Detail
-
getURI
public static java.net.URI getURI(java.net.URL aURL)
Returns a URL for given string.
-
getRedirectString
public static java.lang.String getRedirectString(java.lang.String aURLString)
Returns a redirect string.
-
openURL
public static void openURL(java.lang.String aURL)
Tries to open the given URL with the platform reader.
-
getBytes
public static byte[] getBytes(java.net.URL aURL) throws java.io.IOException
Returns bytes for url.- Throws:
java.io.IOException
-
isLocal
public static boolean isLocal(java.net.URL aURL)
Returns whether a URL is local.
-
getFile
public static java.io.File getFile(java.net.URL aURL)
Returns the URL as a file.
-
getLocalFile
public static java.io.File getLocalFile(java.net.URL aURL) throws java.io.IOException
Returns the given URL as a file (downloading to temp dir, if necessary).- Throws:
java.io.IOException
-
getLocalFile
public static java.io.File getLocalFile(java.net.URL aURL, java.io.File aFile) throws java.io.IOException
Returns the given URL as given file by downloading it.- Throws:
java.io.IOException
-
getLocalFileDestination
public static java.io.File getLocalFileDestination(java.net.URL aURL, java.io.File aFile)
Returns the destination file that the given URL would be saved to using the getLocalFile method.
-
sendCGIEmail
public static java.lang.Exception sendCGIEmail(java.lang.String aURLString, java.util.Map aMap)
Send CGI Email.
-
sendCGIEmail
public static java.lang.Exception sendCGIEmail(java.net.URL aURL, java.util.Map aMap)
Send CGI Email.
-
-