Documentation for Confluence 2.5.4 - 2.5.8.
Documentation for [Confluence Cloud] and the latest Confluence Server is available too.

The recommended way to get resources from the classpath in Confluence is:

InputStream in = com.atlassian.core.util.ClassLoaderUtils.getResourceAsStream(filename, this);

ClassLoaderUtils tries a couple of different classloaders, something we've occasionally found necessary in some application servers.