The Auxiliary Files Service provides an interface which enables the retrieval of auxiliary files.

Method Description

InputStream openAuxiliaryFile(ComponentInfo resource, String name)

Retrieves an input stream for reading an auxiliary file for a component. It is the responsibility of the code that calls this method to close the input stream.

Parameters:

  • ComponentInfo resource - the component information for the resource (the component which the file belongs to).

Exceptions:

  • FileNotFoundException - if the requested file does not exist.
  • SecurityException - if the requested file is not accessible.
File getAuxiliaryFile(ComponentInfo resource, String name)

Retrieves a file for a component.

Parameters:

  • ComponentInfo resource - the component information for the resource (the component which the file belongs to).

Exceptions:

  • FileNotFoundException - if the requested file does not exist.
  • SecurityException - if the requested file is not accessible.

File getAuxiliaryFileDirectory(ComponentInfo resource)

Retrieves the auxiliary file directory.

Parameters:

  • ComponentInfo resource - the component information for the resource (the component which the file belongs to).

Exceptions:

  • FileNotFoundException - if the requested directory does not exist.

ClassLoader createAuxiliaryFileClassLoader(ComponentInfo resource, ClassLoader parentClassLoader)

Creates a <code>ClassLoader</code> that includes the auxiliary file directory for the component and the JAR files at the top level of the auxiliary file store for the component.

Parameters:

  • ComponentInfo resource - the component information for the resource (the component which the file belongs to).

Save

Save