Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.ode.bpel.compiler
Class DefaultResourceFinder

    java.lang.Object
      org.apache.ode.bpel.compiler.DefaultResourceFinder

All Implemented Interfaces:
  ResourceFinder

    public class DefaultResourceFinder

extends java.lang.Object
implements ResourceFinder

Basic implementation of the `ResourceFinder` interface. Resolves URIs relative to a base URI specified at the time of construction.

Constructor Summary
`DefaultResourceFinder()` Default constructor: resolve relative URIs against current working directory.
`DefaultResourceFinder(java.io.File relativeDir, java.io.File absoluteDir)` Constructor: resolve relative URIs against specified directory.

Method Summary
`java.net.URI` | `getBaseResourceURI()`
`java.io.InputStream` | `openResource(java.net.URI uri)` Obtain an input stream to the resource at the given URI.

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

Constructor Detail

### DefaultResourceFinder

    public DefaultResourceFinder()

  Default constructor: resolve relative URIs against current working directory.

### DefaultResourceFinder

    public DefaultResourceFinder(java.io.File relativeDir,
                                 java.io.File absoluteDir)

  Constructor: resolve relative URIs against specified directory.

  Parameters:
    `relativeDir` - base path for relative URLs.
    `absoluteDir` - base path for absolute URLs.

Method Detail

### openResource

    public java.io.InputStream openResource(java.net.URI uri)
                                     throws java.net.MalformedURLException,
                                            java.io.IOException

  Description copied from interface: `ResourceFinder`
  Obtain an input stream to the resource at the given URI.

  Specified by:
    `openResource` in interface `ResourceFinder`
  Parameters:
    `uri` - resource URI
  Returns:
    input stream or `null` if the resource is not found
  Throws:
    `java.net.MalformedURLException` - in case of invalid URI
    `java.io.IOException` - in case of read error

### getBaseResourceURI

    public java.net.URI getBaseResourceURI()

  Specified by:
    `getBaseResourceURI` in interface `ResourceFinder`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD