Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

javax.ide.net
Class VirtualFileSystem  view VirtualFileSystem download VirtualFileSystem.java

java.lang.Object
  extended byjavax.ide.Service
      extended byjavax.ide.net.VirtualFileSystem

public class VirtualFileSystem
extends javax.ide.Service

The VirtualFileSystem class is responsible for encapsulating the notion of file system operations on content that is pointed to by an java.net.URI.

The behavior of VirtualFileSystem can be extended by subclasses of VirtualFileSystemHelper. An instance of VirtualFileSystemHelper is registered with VirtualFileSystem in association with a particular scheme. Scheme-specific behavior can thus be encapsulated by a specific implementation of VirtualFileSystemHelper. IDE implementations do not need to register an implementation of this service. The default registered implementation delegates most of its operations to registered VirtualFileSystemHelpers.


Field Summary
private  VirtualFileSystemHelper _defaultHelper
           
private  java.util.ArrayList _existsTests
           
private  java.util.HashMap _helpers
           
private static boolean _isCaseSensitive
           
private static int COPY_BUFFER_SIZE
           
static java.lang.String FILE_SCHEME
          The "file" URI scheme.
static java.lang.String HTTP_SCHEME
          The "http" URI scheme.
static java.lang.String JAR_SCHEME
          The "jar" URI scheme.
 
Fields inherited from class javax.ide.Service
 
Constructor Summary
VirtualFileSystem()
           
 
Method Summary
 void addExistsTest(URIExistsTest existsTest)
          Add an implementation of the URIExistsTest interface.
 boolean canCreate(java.net.URI uri)
          Tests whether the application can create the resource at the specified java.net.URI.
 java.net.URI canonicalize(java.net.URI uri)
          Returns a canonical form of the java.net.URI, if one is available.
 boolean canRead(java.net.URI uri)
          Tests whether the application can read the resource at the specified java.net.URI.
 boolean canWrite(java.net.URI uri)
          Tests whether the application can modify the resource at the specified java.net.URI.
 java.net.URI convertSuffix(java.net.URI uri, java.lang.String oldSuffix, java.lang.String newSuffix)
          Takes the given java.net.URI and checks if its Object.toString()>Object.toString() 55 representation ends with the specified oldSuffix.
private static void copy(java.io.InputStream in, java.io.OutputStream out)
          Common code for copy routines.
 void copy(java.io.InputStream in, java.net.URI dst)
          Copies the contents of in to dst.
 void copy(java.net.URI src, java.io.File dst)
          Copies the contents of src to dst.
 void copy(java.net.URI src, java.net.URI dst)
          Copies the contents at src to dst.
 java.net.URI createTempFile(java.lang.String prefix, java.lang.String suffix, java.net.URI directory)
          Creates a new empty temporary file in the specified directory using the given prefix and suffix strings to generate its name.
 boolean delete(java.net.URI uri)
          Deletes the resource pointed to by the specified java.net.URI.
 java.net.URI ensureSuffix(java.net.URI uri, java.lang.String suffix)
          This method ensures that the specified java.net.URI ends with the specified suffix.
 boolean equals(java.net.URI uri1, java.net.URI uri2)
          Returns true if both of the specified java.net.URI parameters point to the same java.net.URI instance or if both java.net.URI parameters have the same scheme and the scheme helper determines that the java.net.URI objects are equal.
 boolean exists(java.net.URI uri)
          Tests whether a resource at the specified java.net.URI location currently exists.
 VirtualFileSystemHelper findHelper(java.lang.String scheme)
          Returns the VirtualFileSystemHelper class that is currently registered to handle operations related to the specified scheme.
 VirtualFileSystemHelper findHelper(java.net.URI uri)
          Returns the VirtualFileSystemHelper class that is currently registered to handle operations related to the specified java.net.URI.
 java.net.URI getBaseParent(java.net.URI uri, java.lang.String relativeSpec)
          This method gets the base directory fully containing the relative path.
 java.lang.String getFileName(java.net.URI uri)
          Returns the name of the file contained by the java.net.URI, not including any scheme, authority, directory path, query, or fragment.
 long getLength(java.net.URI uri)
          Returns the number of bytes contained in the resource that the specified java.net.URI points to.
 java.lang.String getName(java.net.URI uri)
          Returns the name of the file contained by the java.net.URI, not including any scheme, authority, directory path, file extension, query, or fragment.
 java.net.URI getParent(java.net.URI uri)
          Returns the java.net.URI representing the parent of the specified java.net.URI.
 java.lang.String getPath(java.net.URI uri)
          Returns the path part of the java.net.URI.
 java.lang.String getPathNoExt(java.net.URI uri)
          Returns the path part of the java.net.URI without the last file extension.
 java.lang.String getPlatformPathName(java.net.URI uri)
          Returns the platform-dependent String representation of the java.net.URI; the returned string should be considered acceptable for users to read.
 java.lang.String getSuffix(java.net.URI uri)
          If a dot ('.') occurs in the filename part of the path part of the java.net.URI, then all of the text starting at the last dot is returned, including the dot.
static VirtualFileSystem getVirtualFileSystem()
          Gets the VirtualFileSystem implementation for this IDE.
 boolean hasSuffix(java.net.URI uri, java.lang.String suffix)
          Returns true if the path part of the java.net.URI ends with the given suffix String.
 boolean isBaseURIFor(java.net.URI uri1, java.net.URI uri2)
          Returns true if uri1 represents a a directory and uri2 points to a location within uri1's directory tree.
 boolean isBound(java.net.URI uri)
          This method tests whether the specified java.net.URI is bound to an existing resource, which may reside in memory (not yet saved) or already exist at the java.net.URI location.
 boolean isDirectory(java.net.URI uri)
          Tests whether the location indicated by the java.net.URI is a directory resource.
 boolean isDirectoryPath(java.net.URI uri)
          Tests whether the location indicated by the java.net.URI represents a directory path.
 boolean isHidden(java.net.URI uri)
          Tests whether the resource indiciated by the java.net.URI is a hidden file.
static boolean isLocalFileSystemCaseSensitive()
          Returns true if the local file system is case sensitive.
 boolean isReadOnly(java.net.URI uri)
          Returns true if the resource is read-only.
 boolean isRegularFile(java.net.URI uri)
          Tests whether the resource indiciated by the java.net.URI is a regular file.
 boolean isRoot(java.net.URI uri)
          Returns true if the specified java.net.URI corresponds to the root of a file system; false otherwise.
 boolean isValid(java.net.URI uri)
          Tests whether the specified java.net.URI is valid.
 long lastModified(java.net.URI uri)
          Returns the last modified time of the resource pointed to by the java.net.URI.
 java.net.URI[] list(java.net.URI uri)
          Returns an array of java.net.URIs identifying resources in the directory resource indicated by the java.net.URI.
 java.net.URI[] list(java.net.URI uri, URIFilter filter)
          Returns an array of java.net.URIs identifying resources in the directory resource indicated by the java.net.URI; the specified URIFilter is applied to determine which java.net.URIs will be returned.
 java.net.URI[] listRoots()
          Returns an array of java.net.URIs that represent the root resources available.
 boolean mkdir(java.net.URI uri)
          Creates the directory indicated by the java.net.URI.
 boolean mkdirs(java.net.URI uri)
          Creates the directory indicated by the specified java.net.URI including any necessary but nonexistent parent directories.
 java.io.InputStream openInputStream(java.net.URI uri)
          Opens an java.io.InputStream for the location indicated by the specified java.net.URI.
 java.io.OutputStream openOutputStream(java.net.URI uri)
          Opens an java.io.OutputStream on the java.net.URI.
 void registerHelper(java.lang.String scheme, VirtualFileSystemHelper helper)
          Registers the specified VirtualFileSystemHelper as the object that can handle VirtualFileSystem operations for java.net.URIs of the specified scheme.
 boolean renameTo(java.net.URI oldURI, java.net.URI newURI)
          Renames the resource indicated by the first java.net.URI to the name indicated by the second java.net.URI.
private static boolean schemesAreEqual(java.net.URI uri1, java.net.URI uri2)
          Compares the schemes of the specified java.net.URI parameters for equality.
 boolean setLastModified(java.net.URI uri, long time)
          Sets the last-modified timestamp of the resource indicated by the java.net.URI to the time specified by time.
 boolean setReadOnly(java.net.URI uri, boolean readOnly)
          Sets the read-only status of the resource indicated by the java.net.URI according to the specified readOnly flag.
 java.lang.String toDisplayString(java.net.URI uri)
          Returns a displayable form of the complete java.net.URI.
 java.lang.String toRelativeSpec(java.net.URI uri, java.net.URI base)
          Converts a uri to a relative spec.
 java.lang.String toRelativeSpec(java.net.URI uri, java.net.URI base, boolean mustConsumeBase)
          Converts a uri to a relative spec.
 java.net.URL toURL(java.net.URI uri)
          Get a java.net.URL from a java.net.URI.
 
Methods inherited from class javax.ide.Service
getService, initialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPY_BUFFER_SIZE

private static final int COPY_BUFFER_SIZE
See Also:
Constant Field Values

FILE_SCHEME

public static final java.lang.String FILE_SCHEME
The "file" URI scheme.

See Also:
Constant Field Values

HTTP_SCHEME

public static final java.lang.String HTTP_SCHEME
The "http" URI scheme.

See Also:
Constant Field Values

JAR_SCHEME

public static final java.lang.String JAR_SCHEME
The "jar" URI scheme.

See Also:
Constant Field Values

_isCaseSensitive

private static final boolean _isCaseSensitive

_helpers

private final java.util.HashMap _helpers

_defaultHelper

private final VirtualFileSystemHelper _defaultHelper

_existsTests

private final java.util.ArrayList _existsTests
Constructor Detail

VirtualFileSystem

public VirtualFileSystem()
Method Detail

registerHelper

public void registerHelper(java.lang.String scheme,
                           VirtualFileSystemHelper helper)
Registers the specified VirtualFileSystemHelper as the object that can handle VirtualFileSystem operations for java.net.URIs of the specified scheme.

If the scheme is null or the empty string or if helper is null, this method does nothing.


findHelper

public VirtualFileSystemHelper findHelper(java.lang.String scheme)
Returns the VirtualFileSystemHelper class that is currently registered to handle operations related to the specified scheme. If there is no registered helper, then a default helper is returned that can produce a default result.


findHelper

public VirtualFileSystemHelper findHelper(java.net.URI uri)
Returns the VirtualFileSystemHelper class that is currently registered to handle operations related to the specified java.net.URI. If there is no registered helper, then a default helper is returned that can produce a default result.


addExistsTest

public void addExistsTest(URIExistsTest existsTest)
Add an implementation of the URIExistsTest interface. The existsTest object will be called by the isBound() method to determine if an java.net.URI is unique.


canonicalize

public java.net.URI canonicalize(java.net.URI uri)
                          throws java.io.IOException
Returns a canonical form of the java.net.URI, if one is available.


canRead

public boolean canRead(java.net.URI uri)
Tests whether the application can read the resource at the specified java.net.URI.


canWrite

public boolean canWrite(java.net.URI uri)
Tests whether the application can modify the resource at the specified java.net.URI.


canCreate

public boolean canCreate(java.net.URI uri)
Tests whether the application can create the resource at the specified java.net.URI. This method tests that all components of the path can be created. If the resource pointed by the java.net.URI is read-only, this method returns false.


isValid

public boolean isValid(java.net.URI uri)
Tests whether the specified java.net.URI is valid. If the resource pointed by the java.net.URI exists the method returns true. If the resource does not exist, the method tests that all components of the path can be created.


convertSuffix

public java.net.URI convertSuffix(java.net.URI uri,
                                  java.lang.String oldSuffix,
                                  java.lang.String newSuffix)
Takes the given java.net.URI and checks if its Object.toString()>Object.toString() 55 representation ends with the specified oldSuffix. If it does, the suffix is replaced with newSuffix. Both suffix parameters must include the leading dot ('.') if the dot is part of the suffix. If the specified java.net.URI does not end with the oldSuffix, then the newSuffix is simply appended to the end of the original java.net.URI.


copy

public void copy(java.net.URI src,
                 java.net.URI dst)
          throws java.io.IOException
Copies the contents at src to dst. If the destination directory does not exist, it will be created. IOException is thrown if:
  • failed to read the source contents
  • failed to create destination directory
  • failed to write source contents to the destination file


copy

public void copy(java.io.InputStream in,
                 java.net.URI dst)
          throws java.io.IOException
Copies the contents of in to dst.


copy

public void copy(java.net.URI src,
                 java.io.File dst)
          throws java.io.IOException
Copies the contents of src to dst.


copy

private static void copy(java.io.InputStream in,
                         java.io.OutputStream out)
                  throws java.io.IOException
Common code for copy routines. By convention, the streams are closed in the same method in which they were opened. Thus, this method does not close the streams when the copying is done.


delete

public boolean delete(java.net.URI uri)
Deletes the resource pointed to by the specified java.net.URI. If the resource is a file (or analogous to a file), then the file is removed from its directory (or container). If the content is a directory (or analogous to a directory), then the directory is removed only if it is empty (i.e. contains no other files or directories).


ensureSuffix

public java.net.URI ensureSuffix(java.net.URI uri,
                                 java.lang.String suffix)
This method ensures that the specified java.net.URI ends with the specified suffix. The suffix does not necessarily have to start with a ".", so if a leading "." is required, the specified suffix must contain it -- e.g. ".java", ".class".

If the java.net.URI already ends in the specified suffix, then the java.net.URI itself is returned. Otherwise, a new java.net.URI is created with the the specified suffix appended to the original java.net.URI's path part, and the new java.net.URI is returned.


equals

public boolean equals(java.net.URI uri1,
                      java.net.URI uri2)
Returns true if both of the specified java.net.URI parameters point to the same java.net.URI instance or if both java.net.URI parameters have the same scheme and the scheme helper determines that the java.net.URI objects are equal.


exists

public boolean exists(java.net.URI uri)
Tests whether a resource at the specified java.net.URI location currently exists. The test for existence only checks the actual location and does not check any in-memory caches. To employ additional existential tests that do check in-memory caches, see isBound(URI) 55 .


getFileName

public java.lang.String getFileName(java.net.URI uri)
Returns the name of the file contained by the java.net.URI, not including any scheme, authority, directory path, query, or fragment. This simply returns the simple filename. For example, if you pass in an java.net.URI whose string representation is:
scheme://userinfo@host:1010/dir1/dir2/file.ext?query#fragment
the returned value is "file.ext" (without the quotes).


getLength

public long getLength(java.net.URI uri)
Returns the number of bytes contained in the resource that the specified java.net.URI points to. If the length cannot be determined, -1 is returned.


getName

public java.lang.String getName(java.net.URI uri)
Returns the name of the file contained by the java.net.URI, not including any scheme, authority, directory path, file extension, query, or fragment. This simply returns the simple filename. For example, if you pass in an java.net.URI whose string representation is:
scheme://userinfo@host:1010/dir1/dir2/file.ext1.ext2?query#fragment
the returned value is "file" (without the quotes).

The returned file name should only be used for display purposes and not for opening streams or otherwise trying to locate the resource indicated by the java.net.URI.


getParent

public java.net.URI getParent(java.net.URI uri)
Returns the java.net.URI representing the parent of the specified java.net.URI. If there is no parent then null is returned.


getPath

public java.lang.String getPath(java.net.URI uri)
Returns the path part of the java.net.URI. The returned string is acceptable to use in one of the URIFactory methods that takes a path.

This implementation delegates to URI.getPath()>URI.getPath() 55 .


getPathNoExt

public java.lang.String getPathNoExt(java.net.URI uri)
Returns the path part of the java.net.URI without the last file extension. To clarify, the following examples demonstrate the different cases:
Path part of input java.net.URI
Output java.lang.String
/dir/file.ext /dir/file
/dir/file.ext1.ext2 /dir/file.ext1
/dir1.ext1/dir2.ext2/file.ext1.ext2 /dir1.ext1/dir2.ext2/file.ext1
/file.ext /file
/dir.ext/file /dir.ext/file
/dir/file /dir/file
/file /file
/.ext /


getPlatformPathName

public java.lang.String getPlatformPathName(java.net.URI uri)
Returns the platform-dependent String representation of the java.net.URI; the returned string should be considered acceptable for users to read. In general, the returned string should omit as many parts of the java.net.URI as possible. For the "file" scheme, therefore, the platform pathname should just be the pathname alone (no scheme) using the appropriate file separator character for the current platform. For other schemes, it may be necessary to reformat the java.net.URI string into a more human-readable form. That decision is left to each VirtualFileSystemHelper implementation.


getSuffix

public java.lang.String getSuffix(java.net.URI uri)
If a dot ('.') occurs in the filename part of the path part of the java.net.URI, then all of the text starting at the last dot is returned, including the dot. If the last dot is also the last character in the path, then the dot by itself is returned. If there is no dot in the file name (even if a dot occurs elsewhere in the path), then the empty string is returned.

Examples:

  • file:/home/jsr198/foo.txt returns ".txt"
  • file:/home/jsr198/foo.txt.bak returns ".bak"
  • file:/home/jsr198/foo returns ""
  • file:/home/jsr198/foo. returns "."
  • file:/home/jsr198/foo/ returns ""
  • file:/home/jsr198.1/foo returns ""
  • file:/home/jsr198.1/foo.txt returns ".txt"


hasSuffix

public boolean hasSuffix(java.net.URI uri,
                         java.lang.String suffix)
Returns true if the path part of the java.net.URI ends with the given suffix String. The suffix can be any String and doesn't necessarily have to be one that begins with a dot ('.'). If you are trying to test whether the path part of the java.net.URI ends with a particular file extension, then the suffix parameter must begin with a '.' character to ensure that you get the right return value.


isBaseURIFor

public boolean isBaseURIFor(java.net.URI uri1,
                            java.net.URI uri2)
Returns true if uri1 represents a a directory and uri2 points to a location within uri1's directory tree.


isBound

public boolean isBound(java.net.URI uri)
This method tests whether the specified java.net.URI is bound to an existing resource, which may reside in memory (not yet saved) or already exist at the java.net.URI location. This is similar to exists(URI) 55 but differs in that additional tests are applied that check whether the java.net.URI is bound to an in-memory object before the actual java.net.URI location is checked.

More precisely, "bound" means either that an java.net.URI is being used in such a way that a registered URIExistsTest is able to detect the java.net.URI's usage or that a document already exists at the java.net.URI location as determined by exists(URI) 55 ).

Checking for uniqueness of a newly generated java.net.URI is the primary use for this method.


isLocalFileSystemCaseSensitive

public static boolean isLocalFileSystemCaseSensitive()
Returns true if the local file system is case sensitive. Returns false if the local file system is not case sensitive.


isDirectory

public boolean isDirectory(java.net.URI uri)
Tests whether the location indicated by the java.net.URI is a directory resource.


isDirectoryPath

public boolean isDirectoryPath(java.net.URI uri)
Tests whether the location indicated by the java.net.URI represents a directory path. The directory path specified by the java.net.URI need not exist.

This method is intended to be a higher performance version of the isDirectory(URI) 55 method. Implementations of this method should attempt to ascertain whether the specified java.net.URI represents a directory path by simply examining the java.net.URI itself. Time consuming i/o operations should be avoided.


isHidden

public boolean isHidden(java.net.URI uri)
Tests whether the resource indiciated by the java.net.URI is a hidden file. The exact definition of hidden is scheme-dependent and possibly system-dependent. On UNIX systems, a file is considered to be hidden if its name begins with a period character ('.'). On Win32 systems, a file is considered to be hidden if it has been marked as such in the file system.


isReadOnly

public boolean isReadOnly(java.net.URI uri)
Returns true if the resource is read-only. A return value of false means that trying to get an java.io.OutputStream or trying to write to an java.io.OutputStream based on the java.net.URI will cause an IOException to be thrown. If the read-only status cannot be determined for some reason, this method returns true.


isRegularFile

public boolean isRegularFile(java.net.URI uri)
Tests whether the resource indiciated by the java.net.URI is a regular file. A regular is a file that is not a directory and, in addition, satisfies other system-dependent criteria.


isRoot

public boolean isRoot(java.net.URI uri)
Returns true if the specified java.net.URI corresponds to the root of a file system; false otherwise.


lastModified

public long lastModified(java.net.URI uri)
Returns the last modified time of the resource pointed to by the java.net.URI. The returned long is the number of milliseconds since the epoch (00:00:00 GMT Jan 1, 1970). If no timestamp is available, -1 is returned.


list

public java.net.URI[] list(java.net.URI uri)
Returns an array of java.net.URIs identifying resources in the directory resource indicated by the java.net.URI. If the specified java.net.URI does not represent a directory, then this method returns null. Otherwise, an array of java.net.URIs is returned, one for each file or directory in the directory. java.net.URIs representing the directory itself or its parent are not included in the result. There is no guarantee that the java.net.URIs will be returned in any particular order.


list

public java.net.URI[] list(java.net.URI uri,
                           URIFilter filter)
Returns an array of java.net.URIs identifying resources in the directory resource indicated by the java.net.URI; the specified URIFilter is applied to determine which java.net.URIs will be returned. If the specified java.net.URI does not represent a directory, then this method returns null. Otherwise, an array of java.net.URIs is returned, one for each file or directory in the directory that is accepted by the specified filter. java.net.URIs representing the directory itself or its parent are not included in the result. There is no guarantee that the java.net.URIs will occur in any particular order.

If the specified URIFilter is null then no filtering behavior is done.


listRoots

public java.net.URI[] listRoots()
Returns an array of java.net.URIs that represent the root resources available. The determination of the roots is delegated to each registered VirtualFileSystemHelper.


mkdir

public boolean mkdir(java.net.URI uri)
Creates the directory indicated by the java.net.URI.


mkdirs

public boolean mkdirs(java.net.URI uri)
Creates the directory indicated by the specified java.net.URI including any necessary but nonexistent parent directories. Note that if this operation fails, it may have succeeded in creating some of the necessary parent directories. This method returns true if the directory was created along with all necessary parent directories or if the directories already exist; it returns false otherwise.


createTempFile

public java.net.URI createTempFile(java.lang.String prefix,
                                   java.lang.String suffix,
                                   java.net.URI directory)
                            throws java.io.IOException
Creates a new empty temporary file in the specified directory using the given prefix and suffix strings to generate its name.


openInputStream

public java.io.InputStream openInputStream(java.net.URI uri)
                                    throws java.io.IOException
Opens an java.io.InputStream for the location indicated by the specified java.net.URI.


openOutputStream

public java.io.OutputStream openOutputStream(java.net.URI uri)
                                      throws java.io.IOException
Opens an java.io.OutputStream on the java.net.URI. If the file does not exist, the file should be created. If the directory path to the file does not exist, all necessary directories should be created.


renameTo

public boolean renameTo(java.net.URI oldURI,
                        java.net.URI newURI)
Renames the resource indicated by the first java.net.URI to the name indicated by the second java.net.URI.

If either java.net.URI parameter is null or if both of the specified java.net.URI parameters refer to the same resource, then the rename is not attempted and failure is returned.

If the specified java.net.URI parameters do not have the same scheme, then the VirtualFileSystem handles the rename by first copying the resource to the destination with copy(URI, URI) 55 and then deleting the original resource with delete(URI) 55 ; if either operation fails, then failure is returned.

Otherwise, the scheme helper is called to perform the actual rename operation. Scheme helper implementations may therefore assume that both java.net.URI parameters are not null, do not refer to the same resource, and have the same scheme.

If the original java.net.URI refers to a nonexistent resource, then the scheme helper implementations should return failure. It is left up to the scheme helper implementations to decide whether to overwrite the destination or return failure if the destination java.net.URI refers to an existing resource.


setLastModified

public boolean setLastModified(java.net.URI uri,
                               long time)
Sets the last-modified timestamp of the resource indicated by the java.net.URI to the time specified by time. The time is specified in the number of milliseconds since the epoch (00:00:00 GMT Jan 1, 1970). The return value indicates whether or not the setting of the timestamp succeeded.


setReadOnly

public boolean setReadOnly(java.net.URI uri,
                           boolean readOnly)
Sets the read-only status of the resource indicated by the java.net.URI according to the specified readOnly flag. The return value indicates whether or not the setting of the read-only flag succeeded.


toDisplayString

public java.lang.String toDisplayString(java.net.URI uri)
Returns a displayable form of the complete java.net.URI.


toRelativeSpec

public java.lang.String toRelativeSpec(java.net.URI uri,
                                       java.net.URI base)
Converts a uri to a relative spec.


toRelativeSpec

public java.lang.String toRelativeSpec(java.net.URI uri,
                                       java.net.URI base,
                                       boolean mustConsumeBase)
Converts a uri to a relative spec.


getBaseParent

public java.net.URI getBaseParent(java.net.URI uri,
                                  java.lang.String relativeSpec)
This method gets the base directory fully containing the relative path.


toURL

public java.net.URL toURL(java.net.URI uri)
                   throws java.net.MalformedURLException
Get a java.net.URL from a java.net.URI.


schemesAreEqual

private static boolean schemesAreEqual(java.net.URI uri1,
                                       java.net.URI uri2)
Compares the schemes of the specified java.net.URI parameters for equality. The schemes are considered to be unequal if either java.net.URI is null, even when both java.net.URI parameters are null.


getVirtualFileSystem

public static VirtualFileSystem getVirtualFileSystem()
Gets the VirtualFileSystem implementation for this IDE.