|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ungoverned.moduleloader.SystemResourceSource
public class SystemResourceSource
This class implements a ResourceSource for retrieving resources from the system class loader. Effectively, the methods of this resource source defer their functionality to ClassLoder.getSystemClassLoader().getResource().
ResourceSource
Constructor Summary | |
---|---|
SystemResourceSource()
|
Method Summary | |
---|---|
void |
close()
This method de-initializes the resource source. |
byte[] |
getBytes(java.lang.String name)
This method returns a byte array of the specified resource's contents. |
boolean |
hasResource(java.lang.String name)
This method returns a boolean indicating whether the resource source contains the specified resource. |
void |
open()
This method initializes the resource source. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SystemResourceSource()
Method Detail |
---|
public void open()
ResourceSource
This method initializes the resource source. It is called when the associated module is added to the ModuleManager. It is acceptable for implementations to ignore duplicate calls to this method if the resource source is already opened.
open
in interface ResourceSource
public void close()
ResourceSource
This method de-initializes the resource source. It is called when the associated module is removed from the ModuleManager or when the module is reset by the ModuleManager.
close
in interface ResourceSource
public boolean hasResource(java.lang.String name) throws java.lang.IllegalStateException
ResourceSource
This method returns a boolean indicating whether the resource source contains the specified resource.
hasResource
in interface ResourceSource
name
- the name of the resource whose existence is being checked.
java.lang.IllegalStateException
- if the resource source has not
been opened.public byte[] getBytes(java.lang.String name) throws java.lang.IllegalStateException
ResourceSource
This method returns a byte array of the specified resource's contents.
getBytes
in interface ResourceSource
name
- the name of the resource to retrieve.
java.lang.IllegalStateException
- if the resource source has not
been opened.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |