| |
|
| java.lang.Object org.restlet.data.Reference org.restlet.data.LocalReference
LocalReference | final public class LocalReference extends Reference (Code) | | Reference to a local (i.e. non remote) resource. It has helper methods for
the three following schemes:
Protocol.CLAP ,
Protocol.FILE and
Protocol.JAR .
author: Jerome Louvel (contact@noelios.com) |
Field Summary | |
final public static int | CLAP_CLASS The resources will be resolved from the classloader associated with the
local class. | final public static int | CLAP_SYSTEM The resources will be resolved from the system's classloader. | final public static int | CLAP_THREAD The resources will be resolved from the current thread's classloader. |
CLAP_CLASS | final public static int CLAP_CLASS(Code) | | The resources will be resolved from the classloader associated with the
local class. Examples: clap://class/rootPkg/subPkg/myClass.class or
clap://class/rootPkg/file.html
See Also: java.lang.Class.getClassLoader |
CLAP_SYSTEM | final public static int CLAP_SYSTEM(Code) | | The resources will be resolved from the system's classloader. Examples:
clap://system/rootPkg/subPkg/myClass.class or
clap://system/rootPkg/file.html
See Also: java.lang.ClassLoader.getSystemClassLoader |
CLAP_THREAD | final public static int CLAP_THREAD(Code) | | The resources will be resolved from the current thread's classloader.
Examples: clap://thread/rootPkg/subPkg/myClass.class or
clap://thread/rootPkg/file.html
See Also: java.lang.Thread.getContextClassLoader |
LocalReference | public LocalReference(Reference localRef)(Code) | | Constructor.
Parameters: localRef - The local reference. |
LocalReference | public LocalReference(String localUri)(Code) | | Constructor.
Parameters: localUri - The local URI. |
createClapReference | public static LocalReference createClapReference(int authorityType, String path)(Code) | | Constructor.
Parameters: authorityType - The authority type for the resource path. Parameters: path - The resource path. |
createFileReference | public static LocalReference createFileReference(File file)(Code) | | Constructor.
Parameters: file - The file whose path must be used. |
createFileReference | public static LocalReference createFileReference(String filePath)(Code) | | Constructor.
Parameters: filePath - The local file path. |
createFileReference | public static LocalReference createFileReference(String hostName, String filePath)(Code) | | Constructor.
Parameters: hostName - The authority (can be a host name or the special"localhost" or an empty value). Parameters: filePath - The file path. |
createJarReference | public static LocalReference createJarReference(Reference jarFile, String entryPath)(Code) | | Constructor.
Parameters: jarFile - The JAR file reference. Parameters: entryPath - The entry path inside the JAR file. |
getAuthorityName | public static String getAuthorityName(int authority)(Code) | | Returns an authority name.
Parameters: authority - The authority. The name. |
getClapAuthorityType | public int getClapAuthorityType()(Code) | | Returns the type of authority.
The type of authority. |
getFile | public File getFile()(Code) | | Gets the local file corresponding to the reference. Only URIs referring
to the "localhost" or to an empty authority are supported.
The local file corresponding to the reference. |
getJarEntryPath | public String getJarEntryPath()(Code) | | Returns the JAR entry path.
The JAR entry path. |
getJarFileRef | public Reference getJarFileRef()(Code) | | Returns the JAR file reference.
The JAR file reference. |
localizePath | public static String localizePath(String path)(Code) | | Localize a path by converting all the separator characters to the
system-dependant separator character.
Parameters: path - The path to localize. The localized path. |
normalizePath | public static String normalizePath(String path)(Code) | | Normalize a path by converting all the system-dependant separator
characters to the standard '/' separator character.
Parameters: path - The path to normalize. The normalize path. |
Methods inherited from org.restlet.data.Reference | public static String decode(String toDecode)(Code)(Java Doc) public static String decode(String toDecode, CharacterSet characterSet)(Code)(Java Doc) public static String encode(String toEncode)(Code)(Java Doc) public static String encode(String toEncode, CharacterSet characterSet)(Code)(Java Doc) public boolean equals(Object object)(Code)(Java Doc) public String getAuthority()(Code)(Java Doc) public Reference getBaseRef()(Code)(Java Doc) public String getFragment()(Code)(Java Doc) public String getHierarchicalPart()(Code)(Java Doc) public String getHostDomain()(Code)(Java Doc) public String getHostIdentifier()(Code)(Java Doc) public int getHostPort()(Code)(Java Doc) public String getIdentifier()(Code)(Java Doc) public String getLastSegment()(Code)(Java Doc) public Reference getParentRef()(Code)(Java Doc) public String getPath()(Code)(Java Doc) public String getQuery()(Code)(Java Doc) public Form getQueryAsForm()(Code)(Java Doc) public Form getQueryAsForm(CharacterSet characterSet)(Code)(Java Doc) public String getRelativePart()(Code)(Java Doc) public Reference getRelativeRef()(Code)(Java Doc) public Reference getRelativeRef(Reference base)(Code)(Java Doc) public String getRemainingPart()(Code)(Java Doc) public String getScheme()(Code)(Java Doc) public Protocol getSchemeProtocol()(Code)(Java Doc) public String getSchemeSpecificPart()(Code)(Java Doc) public List<String> getSegments()(Code)(Java Doc) public Reference getTargetRef()(Code)(Java Doc) public String getUserInfo()(Code)(Java Doc) public int hashCode()(Code)(Java Doc) public boolean isAbsolute()(Code)(Java Doc) public boolean isEquivalentTo(Reference ref)(Code)(Java Doc) public boolean isHierarchical()(Code)(Java Doc) public boolean isOpaque()(Code)(Java Doc) public boolean isParent(Reference childRef)(Code)(Java Doc) public boolean isRelative()(Code)(Java Doc) public Reference normalize()(Code)(Java Doc) public void setAuthority(String authority)(Code)(Java Doc) public void setBaseRef(String baseUri)(Code)(Java Doc) public void setBaseRef(Reference baseRef)(Code)(Java Doc) public void setFragment(String fragment)(Code)(Java Doc) public void setHostDomain(String domain)(Code)(Java Doc) public void setHostPort(Integer port)(Code)(Java Doc) public void setIdentifier(String identifier)(Code)(Java Doc) public void setPath(String path)(Code)(Java Doc) public void setProtocol(Protocol protocol)(Code)(Java Doc) public void setQuery(String query)(Code)(Java Doc) public void setRelativePart(String relativePart)(Code)(Java Doc) public void setScheme(String scheme)(Code)(Java Doc) public void setSchemeSpecificPart(String schemeSpecificPart)(Code)(Java Doc) public void setSegments(List<String> segments)(Code)(Java Doc) public void setUserInfo(String userInfo)(Code)(Java Doc) public static String toString(String scheme, String hostName, Integer hostPort, String path, String query, String fragment)(Code)(Java Doc) public static String toString(String relativePart, String query, String fragment)(Code)(Java Doc) public static String toString(String scheme, String host, String path, String query, String fragment)(Code)(Java Doc) public String toString()(Code)(Java Doc) public String toString(boolean query, boolean fragment)(Code)(Java Doc)
|
|
|
|