| 
 | Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.4.0) E17493-05 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.ide.net.URIFactory
public final class URIFactory
This class contains methods which create new instances of
  URI.  In order for URIs to be used effectively as
  keys in a hashtable, the URI must be created in a very consistent
  manner.  Therefore, when creating a new instance of URI, it
  is strongly recommended that you use one of the methods in this class
  rather than calling the URI constructor directly.  This will
  help prevent subtle bugs that can come up when two URI
  instances that should be equal aren't equal (resulting in caching
  bugs) because of a difference in some detail of the URI that affects
  the result of the Object.equals(Object) method but doesn't
  affect the location pointed to by the URI (which means that
  code other than the caching will actually continue to work).
  Additionally, by using the methods in this class to create instances
  of URI, dependencies on URI can be tracked more
  easily.
| Nested Class Summary | |
|---|---|
| static interface | URIFactory.NameGeneratorThis is a callback interface used by the URIFactorywhile it is in the process of producing a new uniqueURI. | 
| Field Summary | |
|---|---|
| static java.lang.String | JAR_URI_SEPARATOR | 
| Method Summary | |
|---|---|
| static boolean | isArchive(java.lang.String pathname)Determine if a given URL represents an jar or zip file. | 
| static boolean | isJarURI(java.net.URI jarURI)Returns trueif the specifiedURIhas
  the "jar" scheme. | 
| static java.net.URI | newDirURI(java.io.File dir)Creates a new URIwith the "file" scheme that is for the
  specified directory. | 
| static java.net.URI | newDirURI(java.lang.String dirPath)Creates a new URIwith the "file" scheme that is for the
  specified directory. | 
| static java.net.URI | newDirURI(java.lang.String scheme,
          java.lang.String dirPath)Creates a new URIthat is the combination of the
  specifiedschemeand the directory path. | 
| static java.net.URI | newDirURI(java.net.URI baseURI,
          java.lang.String relativeSpec)Creates a new URIthat is the combination of the
  specified baseURIand the relative spec string. | 
| static java.net.URI | newFileURI(java.io.File file)This method converts a Fileinstance into anURIinstance using an algorithm that is consistent with the other
  factory methods inURIFactory. | 
| static java.net.URI | newFileURI(java.lang.String filePath)Creates a new URIusing the "file" scheme. | 
| static java.net.URI | newJarURI(java.io.File archiveFile,
          java.lang.String entryName)Builds an URIusing the "jar" scheme based
  on the specified archiveFileand the entry name passed
  in. | 
| static java.net.URI | newJarURI(java.net.URI archiveURI,
          java.lang.String entryName)Builds an URIusing the "jar" scheme based
  on the specified archiveURIand the entry name passed in. | 
| static java.net.URI | newUniqueURI(java.net.URI baseURI,
             URIFactory.NameGenerator nameGen)Creates a new unique URI using the scheme of the specified baseURI. | 
| static java.net.URI | newURI(java.lang.String uriSpec) | 
| static java.net.URI | newURI(java.lang.String scheme,
       java.lang.String path)Standard way of specifying a scheme with a file path. | 
| static java.net.URI | newURI(java.lang.String scheme,
       java.lang.String userinfo,
       java.lang.String host,
       int port,
       java.lang.String path,
       java.lang.String query,
       java.lang.String fragment)Creates a new URIwhose parts have the exact values that
  are specified. | 
| static java.net.URI | newURI(java.net.URI baseURI,
       java.lang.String relativeSpec)Creates a new URIthat is the combination of the
  specified baseURIand the relative spec string. | 
| static java.net.URI | newURI(java.net.URL url)Creates a new URIform anURL. | 
| static java.net.URI | replaceFragmentPart(java.net.URI uri,
                    java.lang.String newFragment)Returns a new URIthat is identical to the specifiedURIexcept that the fragment part of theURIhas been replaced with the specifiednewRef. | 
| static java.net.URI | replaceHostPart(java.net.URI uri,
                java.lang.String newHost)Returns a new URIthat is identical to the specifiedURIexcept that the host part of theURIhas been replaced with the specifiednewHost. | 
| static java.net.URI | replacePathPart(java.net.URI uri,
                java.lang.String newPath)Returns a new URIthat is identical to the specifiedURIexcept that the path part ofURIhas been
  replaced with the specifiednewPath. | 
| static java.net.URI | replacePortPart(java.net.URI uri,
                int newPort)Returns a new URIthat is identical to the specifiedURIexcept that the port part of theURIhas been replaced with the specifiednewPort. | 
| static java.net.URI | replaceQueryPart(java.net.URI uri,
                 java.lang.String newQuery)Returns a new URIthat is identical to the specifiedURIexcept that the query part of theURIhas been replaced with the specifiednewQuery. | 
| static java.net.URI | replaceSchemePart(java.net.URI uri,
                  java.lang.String newScheme)Returns a new URIthat is identical to the specifiedURIexcept that the scheme part of theURIhas been replaced with the specifiednewscheme. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final java.lang.String JAR_URI_SEPARATOR
| Method Detail | 
|---|
public static java.net.URI newURI(java.net.URI baseURI,
                                  java.lang.String relativeSpec)
URI that is the combination of the
  specified base URI and the relative spec string.  The
  base URI is treated as a directory, whether or not the
  URI ends with the "/" character, and the relative spec
  is always treated as relative, even if it begins with a "/".Non-sanitizing.
public static java.net.URI newDirURI(java.net.URI baseURI,
                                     java.lang.String relativeSpec)
URI that is the combination of the
  specified base URI and the relative spec string.  The
  base URI is treated as a directory whether or not it
  ends with the "/" character.  The returned URI will
  return with the "/" character in the path part.Non-sanitizing.
public static java.net.URI newURI(java.lang.String scheme,
                                  java.lang.String path)
URI verbatim, without any changes to
  the file separator character or any other characters. For an URI whose scheme is "file", the
  newFileURI(String) factory method should be used instead.
  Non-sanitizing.
public static java.net.URI newDirURI(java.lang.String scheme,
                                     java.lang.String dirPath)
URI that is the combination of the
  specified scheme and the directory path.  The directory
  path is used in the URI verbatim, without any changes to
  the file separator character or any other characters.  
  The returned URI will return with the "/" character in the 
  path part.Non-sanitizing.
public static java.net.URI newUniqueURI(java.net.URI baseURI,
                                        URIFactory.NameGenerator nameGen)
baseURI. The nameGen object is called to 
  generate a unique name that will be appended to the base uri.
  Non-sanitizing.
public static java.net.URI replaceSchemePart(java.net.URI uri,
                                             java.lang.String newScheme)
URI that is identical to the specified
  URI except that the scheme part of the URI
  has been replaced with the specified newscheme.Non-sanitizing.
public static java.net.URI replacePortPart(java.net.URI uri,
                                           int newPort)
URI that is identical to the specified
  URI except that the port part of the URI
  has been replaced with the specified newPort.Non-sanitizing.
public static java.net.URI replaceHostPart(java.net.URI uri,
                                           java.lang.String newHost)
URI that is identical to the specified
  URI except that the host part of the URI
  has been replaced with the specified newHost.Non-sanitizing.
public static java.net.URI replacePathPart(java.net.URI uri,
                                           java.lang.String newPath)
URI that is identical to the specified
  URI except that the path part of URI has been
  replaced with the specified newPath.Non-sanitizing.
public static java.net.URI replaceFragmentPart(java.net.URI uri,
                                               java.lang.String newFragment)
URI that is identical to the specified
  URI except that the fragment part of the URI
  has been replaced with the specified newRef.Non-sanitizing.
public static java.net.URI replaceQueryPart(java.net.URI uri,
                                            java.lang.String newQuery)
URI that is identical to the specified
  URI except that the query part of the URI
  has been replaced with the specified newQuery.Non-sanitizing.
public static java.net.URI newURI(java.lang.String uriSpec)
public static java.net.URI newFileURI(java.lang.String filePath)
URI using the "file" scheme.
  The specified filePath can be expressed in the
  notation of the platform that the Java VM is currently running on,
  or it can be expressed using the forward slash character ("/") as
  its file separator character, which is the standard file separator
  for URIs.  Note that technically, the forward slash
  character is the only officially recognized hierarchy separator
  character for an URI.
  Sanitizing.
public static java.net.URI newFileURI(java.io.File file)
File instance into an URI
  instance using an algorithm that is consistent with the other
  factory methods in URIFactory.Sanitizing.
URI corresponding to the given File.
  The URI is produced using a mechanism that ensures
  uniformity of the URI format across platforms.public static java.net.URI newDirURI(java.lang.String dirPath)
URI with the "file" scheme that is for the
  specified directory.  Leading and trailing "/" characters are
  added if they are missing.  If the specified dirPath
  is null, then the returned URI is
  null.Sanitizing.
public static java.net.URI newDirURI(java.io.File dir)
URI with the "file" scheme that is for the
  specified directory.  Leading and trailing "/" characters are
  added if they are missing.  This method does not check whether the
  specified File is actually a directory on disk; it just
  assumes that it is.  If the specified dirPath is
  null, then the returned URI is
  null.Sanitizing.
public static java.net.URI newJarURI(java.io.File archiveFile,
                                     java.lang.String entryName)
URI using the "jar" scheme based
  on the specified archive File and the entry name passed
  in.  The entry name is relative to the root of the jar file, so
  it should not begin with a slash.  The entry name may be the
  empty string or null, which means that the returned URI
  should represent the jar file itself.
  Sanitizing for archiveFile; non-sanitizing for entryName.
public static boolean isJarURI(java.net.URI jarURI)
true if the specified URI has
  the "jar" scheme.  Returns false if the specified
  URI is null or has a scheme other than
  "jar".
public static boolean isArchive(java.lang.String pathname)
public static java.net.URI newJarURI(java.net.URI archiveURI,
                                     java.lang.String entryName)
URI using the "jar" scheme based
  on the specified archive URI and the entry name passed in.
  The entry name is relative to the root of the jar file, so it
  should not begin with a slash.  The entry name may be the empty
  string or null, which means that the returned URI
  should represent the jar file itself.Non-sanitizing for both archiveURI and entryName.
public static java.net.URI newURI(java.lang.String scheme,
                                  java.lang.String userinfo,
                                  java.lang.String host,
                                  int port,
                                  java.lang.String path,
                                  java.lang.String query,
                                  java.lang.String fragment)
URI whose parts have the exact values that
  are specified.  In general, you should avoid calling this
  method directly.
  This method is the ultimate place where all of the other
  URIFactory methods end up when creating an
  URI.
  Non-sanitizing.
public static java.net.URI newURI(java.net.URL url)
URI form an URL.
url - The URL from which URI is derived.
| 
 | Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.4.0) E17493-05 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||