@API(type=NOT_EXTENDABLE,
src=PUBLIC)
public interface UtilAccess
Modifier and Type | Method and Description |
---|---|
void |
addCustomEditorVariablesResolver(EditorVariablesResolver resolver)
Add a custom editor variables resolver.
|
java.lang.String |
correctURL(java.lang.String url)
Corrects the given URL by converting not allowed characters to their escaped representation.
|
java.awt.image.BufferedImage |
createImage(java.lang.String imageUrl)
Create the image described by the URL.
|
java.io.Reader |
createReader(java.net.URL url,
java.lang.String defaultEncoding)
Opens a connection for the given URL, examines its contents and decides what kind
of encoding should be used.
|
java.lang.String |
decrypt(java.lang.String toDecrypt)
Decrypts a string using the Oxygen internal encryption system.
|
java.lang.String |
encrypt(java.lang.String toEncrypt)
Encrypts a string using the Oxygen internal encryption system.
|
java.lang.String |
expandEditorVariables(java.lang.String pathWithEditorVariables,
java.net.URL currentEditedURL)
Try to expand the editor variables in a path.
|
java.lang.String |
getExtension(java.net.URL url)
Get the file extension for this URL.
|
java.lang.String |
getFileName(java.lang.String urlPath)
Get the file name from a file or URL path
|
boolean |
isSupportedImageURL(java.net.URL url)
Check if this URL points to a supported image.
|
boolean |
isUnhandledBinaryResourceURL(java.net.URL url)
Check if this URL points to a binary resource which is not handled by Oxygen in any way.
|
java.io.File |
locateFile(java.net.URL url)
Locate the file on disk corresponding to the URL.
|
java.lang.String |
makeRelative(java.net.URL baseURL,
java.net.URL childURL)
Make the child URL relative to the base URL.
|
void |
removeCustomEditorVariablesResolver(EditorVariablesResolver resolver)
Remove a custom editor variables resolver.
|
java.net.URL |
removeUserCredentials(java.net.URL url)
Removes the user name and password from the URL if they are present.
|
java.lang.String makeRelative(java.net.URL baseURL, java.net.URL childURL)
The child URL is relatively expressed to the base URL. If it is not possible, the child URL is returned.
For example if the base URL is "file://c:/projects/exml/base.prx" and the child URL is "file://c:/projects/exml/test/someTest.xml" the result will be: "test/someTest.xml"
baseURL
- The base URL.childURL
- The child URL.childURL
if a relative path cannot be computed.java.lang.String correctURL(java.lang.String url)
url
- The URL to be corrected.null
.java.net.URL removeUserCredentials(java.net.URL url)
url
- The URL from which the user credentials will be removed.java.io.File locateFile(java.net.URL url)
url
- The URL
to be checked.File
from the local file system
or null
if the URL is remote.java.lang.String getExtension(java.net.URL url)
url
- The URL to extract the extension for.java.lang.String getFileName(java.lang.String urlPath)
urlPath
- An URL pathboolean isSupportedImageURL(java.net.URL url)
url
- The URLboolean isUnhandledBinaryResourceURL(java.net.URL url)
url
- The URLjava.lang.String expandEditorVariables(java.lang.String pathWithEditorVariables, java.net.URL currentEditedURL)
pathWithEditorVariables
- The path containing editor variablescurrentEditedURL
- The current edited URLjava.lang.String encrypt(java.lang.String toEncrypt)
toEncrypt
- The string to encrypt.java.lang.String decrypt(java.lang.String toDecrypt)
toDecrypt
- The string to decrypt.void addCustomEditorVariablesResolver(EditorVariablesResolver resolver)
resolver
- The resolver.void removeCustomEditorVariablesResolver(EditorVariablesResolver resolver)
resolver
- The resolver to remove.java.io.Reader createReader(java.net.URL url, java.lang.String defaultEncoding) throws java.io.IOException
url
- The URL to be opened.defaultEncoding
- The encoding to be used when all other ways of detecting it returned
null. This is used instead of creating the input stream reader with no encoding arguments. This
is a JAVA encoding.java.io.IOException
- when an error occurs during the URL connection.Please note that this API is not marked as final and it can change in one of the next versions of the application. If you have suggestions, comments about it, please let us know.
java.awt.image.BufferedImage createImage(java.lang.String imageUrl) throws java.io.IOException
imageUrl
- The URL of the image for which to return the buffered image.java.io.IOException
Please note that this API is not marked as final and it can change in one of the next versions of the application. If you have suggestions, comments about it, please let us know.
© Copyright SyncRO Soft SRL 2002 - 2015. All rights reserved.