Package org.jboss.modules

# Interface Resource

public interface Resource
A single resource from a `ResourceLoader`.

Author:
  David M. Lloyd

## Method Summary

Modifier and Type
Method
Description
`String`
`getName()`
Get the relative resource name.
`long`
`getSize()`
Get the size of the resource, if known.
`URL`
`getURL()`
Get the complete URL of this resource.
`InputStream`
`openStream()`
Open an input stream to this resource.

## Method Details

### getName

String getName()
Get the relative resource name.

Returns:
  the name

### getURL

URL getURL()
Get the complete URL of this resource.

Returns:
  the URL

### openStream

InputStream openStream() throws IOException
Open an input stream to this resource.

Returns:
  the stream
Throws:
  `IOException` - if an I/O error occurs

### getSize

long getSize()
Get the size of the resource, if known.

Returns:
  the size, or 0L if unknown