public class URLReader
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static Log |
_logger |
private static java.lang.String |
SERVER_ROOT_TOKEN |
Constructor and Description |
---|
URLReader() |
Modifier and Type | Method and Description |
---|---|
static java.net.URL |
createLocalCopy(Scope scope,
long projectId,
java.net.URL url,
boolean time)
This method copies the file pointed by the remote URL locally to the server Since this method essentially creates a temporary file in the server that will need to be cleared we have additional
information to define the scope and the id of the project
|
static java.lang.String |
getFileName(java.net.URL url) |
static java.net.URL |
getServerRootURL(java.lang.String localPath) |
static java.net.URL |
getURL(java.lang.String urlString) |
static java.net.URL |
getURL(java.lang.String urlString,
java.lang.String baseURL) |
static java.lang.String |
readStringFromURL(java.net.URL url) |
private static Log _logger
private static final java.lang.String SERVER_ROOT_TOKEN
public static java.net.URL getURL(java.lang.String urlString, java.lang.String baseURL) throws java.io.IOException
urlString
- baseURL
- java.io.IOException
public static java.net.URL getURL(java.lang.String urlString) throws java.io.IOException
urlString
- java.io.IOException
public static java.lang.String readStringFromURL(java.net.URL url) throws java.io.IOException
java.io.IOException
public static java.net.URL createLocalCopy(Scope scope, long projectId, java.net.URL url, boolean time) throws java.io.IOException
url
- scope
- projectId
- java.io.IOException
public static java.lang.String getFileName(java.net.URL url)
public static java.net.URL getServerRootURL(java.lang.String localPath) throws java.net.MalformedURLException
java.net.MalformedURLException