## org.eclipse.emf.ecore.resource.impl
Class EFSURIHandlerImpl

    java.lang.Object
      org.eclipse.emf.ecore.resource.impl.URIHandlerImpl
          org.eclipse.emf.ecore.resource.impl.EFSURIHandlerImpl

All Implemented Interfaces:
  URIHandler

    public class EFSURIHandlerImpl

extends URIHandlerImpl

Field Summary

Fields inherited from interface org.eclipse.emf.ecore.resource.URIHandler
`DEFAULT_HANDLERS`

Constructor Summary
`EFSURIHandlerImpl()` Creates an instance.

Method Summary
`boolean` `canHandle(URI uri)` Returns whether the URI is one that this implementation should treat as a supported Eclipse File System scheme.
`java.io.InputStream` `createInputStream(URI uri, java.util.Map<?,?> options)` Creates an input stream for the URI, assuming it's a URI recognized by the Eclipse File System, and returns it.
`java.io.OutputStream` `createOutputStream(URI uri, java.util.Map<?,?> options)` Creates an output stream for the URI, assuming it's a URI recognized by the Eclipse File System, and returns it.
`void` `delete(URI uri, java.util.Map<?,?> options)` Only HTTP connections support delete.
`boolean` `exists(URI uri, java.util.Map<?,?> options)` If a stream can be created the file exists.
`java.util.Map<java.lang.String,?>` `getAttributes(URI uri, java.util.Map<?,?> options)` Returns a map from String attributes to their corresponding values representing information about various aspects of the URI's state.
`protected java.lang.Object` `getInfo(URI uri, java.util.Map<?,?> options)`
`protected java.lang.Object` `getInfo(URI uri, java.lang.Object store, java.util.Map<?,?> options)`
`protected java.lang.Object` `getStore(URI uri, java.util.Map<?,?> options)`
`void` `setAttributes(URI uri, java.util.Map<java.lang.String,?> attributes, java.util.Map<?,?> options)` Updates the map from String attributes to their corresponding values representing information about various aspects of the URI's state.
`protected void` `setInfo(URI uri, java.lang.Object store, java.lang.Object info, int set, java.util.Map<?,?> options)`

Methods inherited from class org.eclipse.emf.ecore.resource.impl.URIHandlerImpl
`contentDescription, getRequestedAttributes, getResponse, getURIConverter`

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

Constructor Detail

### EFSURIHandlerImpl

    public EFSURIHandlerImpl()

  Creates an instance.

Method Detail

### canHandle

    public boolean canHandle(URI uri)

  Returns whether the URI is one that this implementation should treat as a supported Eclipse File System scheme. This implementation uses Java reflection to check whether there is an Eclipse File System available and if so whether it supports this scheme.

  Specified by:
    `canHandle` in interface `URIHandler`
  Overrides:
    `canHandle` in class `URIHandlerImpl`
  Parameters:
    `uri` - the URI to consider.
  Returns:
    whether the URI is one that this implementation treats as an Eclipse File System scheme.

### getStore

    protected java.lang.Object getStore(URI uri,
                                        java.util.Map<?,?> options)
                                 throws java.io.IOException,
                                        java.lang.IllegalArgumentException,
                                        java.lang.IllegalAccessException,
                                        java.lang.reflect.InvocationTargetException,
                                        java.net.URISyntaxException

  Throws:
    `java.io.IOException`
    `java.lang.IllegalArgumentException`
    `java.lang.IllegalAccessException`
    `java.lang.reflect.InvocationTargetException`
    `java.net.URISyntaxException`

### getInfo

    protected java.lang.Object getInfo(URI uri,
                                       java.lang.Object store,
                                       java.util.Map<?,?> options)
                                throws java.io.IOException,
                                       java.lang.IllegalArgumentException,
                                       java.lang.IllegalAccessException,
                                       java.lang.reflect.InvocationTargetException,
                                       java.net.URISyntaxException

  Throws:
    `java.io.IOException`
    `java.lang.IllegalArgumentException`
    `java.lang.IllegalAccessException`
    `java.lang.reflect.InvocationTargetException`
    `java.net.URISyntaxException`

### getInfo

    protected java.lang.Object getInfo(URI uri,
                                       java.util.Map<?,?> options)
                                throws java.io.IOException,
                                       java.lang.IllegalArgumentException,
                                       java.lang.IllegalAccessException,
                                       java.lang.reflect.InvocationTargetException,
                                       java.net.URISyntaxException

  Throws:
    `java.io.IOException`
    `java.lang.IllegalArgumentException`
    `java.lang.IllegalAccessException`
    `java.lang.reflect.InvocationTargetException`
    `java.net.URISyntaxException`

### setInfo

    protected void setInfo(URI uri,
                           java.lang.Object store,
                           java.lang.Object info,
                           int set,
                           java.util.Map<?,?> options)
                    throws java.io.IOException,
                           java.lang.IllegalArgumentException,
                           java.lang.IllegalAccessException,
                           java.lang.reflect.InvocationTargetException,
                           java.net.URISyntaxException

  Throws:
    `java.io.IOException`
    `java.lang.IllegalArgumentException`
    `java.lang.IllegalAccessException`
    `java.lang.reflect.InvocationTargetException`
    `java.net.URISyntaxException`

### createOutputStream

    public java.io.OutputStream createOutputStream(URI uri,
                                                   java.util.Map<?,?> options)
                                            throws java.io.IOException

  Creates an output stream for the URI, assuming it's a URI recognized by the Eclipse File System, and returns it.

  Specified by:
    `createOutputStream` in interface `URIHandler`
  Overrides:
    `createOutputStream` in class `URIHandlerImpl`
  Parameters:
    `uri` - the URI for which to create the output stream.
    `options` - a map of options to influence the kind of stream that is returned; unrecognized options are ignored and `null` is permitted.
  Returns:
    an open output stream.
  Throws:
    `java.io.IOException` - if there is a problem obtaining an open output stream.
  See Also:
    `URIConverter.createOutputStream(URI, Map)`

### createInputStream

    public java.io.InputStream createInputStream(URI uri,
                                                 java.util.Map<?,?> options)
                                          throws java.io.IOException

  Creates an input stream for the URI, assuming it's a URI recognized by the Eclipse File System, and returns it.

  Specified by:
    `createInputStream` in interface `URIHandler`
  Overrides:
    `createInputStream` in class `URIHandlerImpl`
  Parameters:
    `uri` - the URI for which to create the input stream.
    `options` - a map of options to influence the kind of stream that is returned; unrecognized options are ignored and `null` is permitted.
  Returns:
    an open input stream.
  Throws:
    `java.io.IOException` - if there is a problem obtaining an open input stream.
  See Also:
    `URIConverter.createInputStream(URI, Map)`

### delete

    public void delete(URI uri,
                       java.util.Map<?,?> options)
                throws java.io.IOException

  Description copied from class: `URIHandlerImpl`
  Only HTTP connections support delete.

  Specified by:
    `delete` in interface `URIHandler`
  Overrides:
    `delete` in class `URIHandlerImpl`
  Parameters:
    `uri` - the URI to consider.
    `options` - options to influence how the contents are deleted, or `null` if there are no options.
  Throws:
    `java.io.IOException` - if there is a problem deleting the contents.
  See Also:
    `URIConverter.delete(URI, Map)`

### exists

    public boolean exists(URI uri,
                          java.util.Map<?,?> options)

  Description copied from class: `URIHandlerImpl`
  If a stream can be created the file exists. Specialized support is provided for HTTP connections to avoid fetching the whole stream in that case.

  Specified by:
    `exists` in interface `URIHandler`
  Overrides:
    `exists` in class `URIHandlerImpl`
  Parameters:
    `uri` - the URI to consider.
    `options` - options to influence how the existence determined, or `null` if there are no options.
  Returns:
    whether the given URI has contents.
  See Also:
    `URIConverter.exists(URI, Map)`

### getAttributes

    public java.util.Map<java.lang.String,?> getAttributes(URI uri,
                                                           java.util.Map<?,?> options)

  Description copied from interface: `URIHandler`
  Returns a map from String attributes to their corresponding values representing information about various aspects of the URI's state. The `requested attributes option` can be used to specify which properties to fetch; without that option, all supported attributes will be fetched. If the URI doesn't not support any particular attribute, an entry for that attribute will not be appear in the result.

  Specified by:
    `getAttributes` in interface `URIHandler`
  Overrides:
    `getAttributes` in class `URIHandlerImpl`
  Parameters:
    `uri` - the URI to consider.
    `options` - options to influence how the attributes are determined, or `null` if there are no options.
  Returns:
    a map from String attributes to their corresponding values representing information about various aspects of the URI's state.

### setAttributes

    public void setAttributes(URI uri,
                              java.util.Map<java.lang.String,?> attributes,
                              java.util.Map<?,?> options)
                       throws java.io.IOException

  Description copied from interface: `URIHandler`
  Updates the map from String attributes to their corresponding values representing information about various aspects of the URI's state. Unsupported or unchangeable attributes are ignored.

  Specified by:
    `setAttributes` in interface `URIHandler`
  Overrides:
    `setAttributes` in class `URIHandlerImpl`
  Parameters:
    `uri` - the URI to consider.
    `attributes` - the new values for the attributes.
    `options` - options to influence how the attributes are updated, or `null` if there are no options.
  Throws:
    `java.io.IOException` - if there is a problem updating the attributes.

Copyright 2001-2006 IBM Corporation and others. All Rights Reserved.