Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.5.0)

E13403-06


oracle.ide.net
Class HttpURLFileSystemHelper

java.lang.Object
  extended by oracle.ide.net.URLFileSystemHelper
      extended by oracle.ide.net.HttpURLFileSystemHelper


public class HttpURLFileSystemHelper
extends URLFileSystemHelper

The HttpURLFileSystemHelper class provides an implementation of URLFileSystemHelper for http URLs.


Constructor Summary
HttpURLFileSystemHelper()
           

 

Method Summary
 boolean canCreate(java.net.URL url)
          Tests whether the application can create the resource at the specified URL.
 boolean exists(java.net.URL url)
          Returns true if the specified URL points to a resource that currently exists; returns false otherwise.
 long getLength(java.net.URL url)
          Returns the number of bytes contained in the resource that the specified URL points to.
 java.net.URL getParent(java.net.URL url)
          Returns the URL representing the parent directory of the specified URL.
 java.lang.String getSystemDisplayName(java.net.URL url)
          Returns the name of a resource as it would be displayed in a system file browser.
protected  boolean haveSamePort(java.net.URL url1, java.net.URL url2)
           
 long lastModified(java.net.URL url)
          Returns the last modification time (timestamp) of the resource indicated by the specified URL in milliseconds since 00:00:00 GMT, Jan 1, 1970.
 java.io.InputStream openInputStream(java.net.URL url)
          Opens an InputStream on the specified URL.

 

Methods inherited from class oracle.ide.net.URLFileSystemHelper
addURLFileSystemListener, appendRelativePath, areEqual, areEqualPathElems, canDelete, canonicalize, canRead, canWrite, code, convertSuffix, createReader, createTempFile, delete, ensureSuffix, equals, getBaseParent, getDefaultIcon, getFileName, getName, getPath, getPathNoExt, getPlatformPathName, getSuffix, getSystemIcon, getTempDirectory, hashCode, hasSuffix, haveSameAuthority, haveSameHost, haveSamePath, haveSameProtocol, haveSameQuery, haveSameRef, haveSameUserInfo, isBaseURLFor, isDirectory, isDirectoryPath, isHidden, isLocal, isReadOnly, isRegularFile, isValid, list, list, list, listRoots, ls, ls, lsCached, lsCached, mkdir, mkdirs, openOutputStream, removeURLFileSystemListener, rename, setLastModified, setReadOnly, toDisplayString, toEncodedString, toEncodedString, toRelativeSpec, toRelativeSpec, verifyList

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

HttpURLFileSystemHelper

public HttpURLFileSystemHelper()

Method Detail

getSystemDisplayName

public java.lang.String getSystemDisplayName(java.net.URL url)
Returns the name of a resource as it would be displayed in a system file browser.
Overrides:
getSystemDisplayName in class URLFileSystemHelper
Parameters:
url - the URL of the resource
Returns:
the display name as a string
See Also:
URLFileSystemHelper.getSystemIcon(URL)

getLength

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

The default implementation attempts to get the content length from the URLConnection associated with the URL. If that fails for some reason (e.g. the resource does not exist, there was some other an I/O exception, etc.), -1 is returned.

Overrides:
getLength in class URLFileSystemHelper
See Also:
URLConnection

lastModified

public long lastModified(java.net.URL url)
Returns the last modification time (timestamp) of the resource indicated by the specified URL in milliseconds since 00:00:00 GMT, Jan 1, 1970. If the timestamp can't be determined, -1 is returned.

The default implementation attemps to get the last modified time from the URLConnection associated with the URL. If that fails for some reason (e.g. the resource does not exist, there was some other I/O exception, etc.), -1 is returned.

Overrides:
lastModified in class URLFileSystemHelper
See Also:
URLConnection

exists

public boolean exists(java.net.URL url)
Description copied from class: URLFileSystemHelper
Returns true if the specified URL points to a resource that currently exists; returns false otherwise.

The default implementation simply returns false without doing anything.

Overrides:
exists in class URLFileSystemHelper

canCreate

public boolean canCreate(java.net.URL url)
Tests whether the application can create the resource at the specified URL.
Overrides:
canCreate in class URLFileSystemHelper
Returns:
true if the resource at the specified URL exists or can be created; false otherwise.

getParent

public java.net.URL getParent(java.net.URL url)
Description copied from class: URLFileSystemHelper
Returns the URL representing the parent directory of the specified URL. If there is no parent directory, then null is returned.

The default implementation returns the value of invoking URLFactory.newURL( url, ".." ), removing the reference portion of the URL.

Overrides:
getParent in class URLFileSystemHelper

openInputStream

public java.io.InputStream openInputStream(java.net.URL url)
                                    throws java.io.IOException
Opens an InputStream on the specified URL.

The default implementation attempts to open the InputStream through the URLConnection associated with the URL. If the URLConnection implementation does not support an InputStream then an UnknownServiceException (a runtime exception) will be thrown.

Overrides:
openInputStream in class URLFileSystemHelper
Throws:
java.io.FileNotFoundException - if the resource at the specified URL does not exist.
java.io.IOException - if an I/O error occurs when trying to open the InputStream.
java.net.UnknownServiceException - if the URLConnection backing the specified URL does not support an InputStream.
See Also:
IOException, URLConnection, UnknownServiceException

haveSamePort

protected boolean haveSamePort(java.net.URL url1,
                               java.net.URL url2)
Overrides:
haveSamePort in class URLFileSystemHelper

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.5.0)

E13403-06


Copyright © 1997, 2011, Oracle. All rights reserved.