Class ClasspathResourceSystem
- java.lang.Object
 - 
- net.officefloor.web.resource.classpath.ClasspathResourceSystem
 
 
- 
- All Implemented Interfaces:
 ResourceSystem
public class ClasspathResourceSystem extends java.lang.Object implements ResourceSystem
Locates aHttpFilefrom aClassLoader.- Author:
 - Daniel Sagenschneider
 
 
- 
- 
Constructor Summary
Constructors Constructor Description ClasspathResourceSystem(ResourceSystemContext context, java.lang.ClassLoader classLoader)Instantiate. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClassPathNodegetNode(java.lang.String path)Obtains theClassPathNodefor resource path.java.nio.file.PathgetResource(java.lang.String path)Obtains thePathto the resource. 
 - 
 
- 
- 
Constructor Detail
- 
ClasspathResourceSystem
public ClasspathResourceSystem(ResourceSystemContext context, java.lang.ClassLoader classLoader) throws java.io.IOException
Instantiate.- Parameters:
 context-ResourceSystemContext.classLoader-ClassLoader.- Throws:
 java.io.IOException- If fails to initiate resources from the class path.
 
 - 
 
- 
Method Detail
- 
getNode
public ClassPathNode getNode(java.lang.String path)
Obtains theClassPathNodefor resource path.- Parameters:
 path- Resource path.- Returns:
 ClassPathNodefor resource path ornullif no resource.
 
- 
getResource
public java.nio.file.Path getResource(java.lang.String path) throws java.io.IOExceptionDescription copied from interface:ResourceSystemObtains thePathto the resource.- Specified by:
 getResourcein interfaceResourceSystem- Parameters:
 path- Path for the resource.- Returns:
 Pathif resource found, otherwisenull.- Throws:
 java.io.IOException- If failure in obtainingPath.
 
 - 
 
 -