The Robot Application Programming Interface Delegate Project
RAPID Logo

URIUtil Class Reference

Collaboration diagram for URIUtil:

List of all members.

Public Member Functions

URI toURI (URL url) throws URISyntaxException
 properly encode a URI from a URL, unlike the braindead URL.toURI() method

Static Public Member Functions

static String decode (String value)
 Decodes the given string by interpreting three-digit escape sequences as the bytes of a UTF-8 encoded character and replacing them with the characters they represent.
static File copyFile (URI remote, String directoryName, String filename) throws IOException
 Copy a file specified with a URI to a new location.
static long getLastModified (URI uri)
 Get the last modified time of the contents of the uri.
static long getLastModified (URL url)
 Get the last modified time of the contents of the uri.
static String getURIAsString (String path) throws URISyntaxException
 pass in a string that we want to make sure can be a uri return the uri-happy string (spaces encoded, file prefix) or the same string if this fails.

Member Function Documentation

static File copyFile ( URI  remote,
String  directoryName,
String  filename 
) throws IOException [static]

This does not do checking of timestamp.

Parameters:
remotethe URI of the remote file to copy
directoryNamethe string describing the full path for the newly copied file
filenamethe newly copied filename
Returns:
the newly copied file.
Exceptions:
IOException
static String decode ( String  value) [static]

Incomplete escape sequences are ignored and invalid UTF-8 encoded bytes are treated as extended ASCII characters.

static long getLastModified ( URL  url) [static]
Parameters:
uri
Returns:
0 if there was a problem getting to the file.
static long getLastModified ( URI  uri) [static]
Parameters:
uri
Returns:
0 if there was a problem getting to the file.
static String getURIAsString ( String  path) throws URISyntaxException [static]
Parameters:
path
Returns:

Here is the call graph for this function:

URI toURI ( URL  url) throws URISyntaxException
Exceptions:
URISyntaxException

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines